fix: exclude database components from app releases and deployments
This commit is contained in:
@@ -1008,9 +1008,14 @@ export class AppsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const app = release?.app ?? quickBuild!.component.app;
|
const app = release?.app ?? quickBuild!.component.app;
|
||||||
const images = release
|
const releaseImages = release
|
||||||
? parseReleaseImageTags(release.imageTags).images
|
? parseReleaseImageTags(release.imageTags).images
|
||||||
: { [quickBuild!.component.name]: quickBuild!.image! };
|
: { [quickBuild!.component.name]: quickBuild!.image! };
|
||||||
|
const images = Object.fromEntries(
|
||||||
|
Object.entries(releaseImages).filter(([componentName]) => (
|
||||||
|
app.components.find((component) => component.name === componentName)?.type !== 'DATABASE'
|
||||||
|
)),
|
||||||
|
);
|
||||||
const deploymentLabel = release
|
const deploymentLabel = release
|
||||||
? `${app.name} ${release.version}`
|
? `${app.name} ${release.version}`
|
||||||
: `${app.name} ${quickBuild!.component.name} ${quickBuild!.commitSha?.slice(0, 7) ?? 'quick'}`;
|
: `${app.name} ${quickBuild!.component.name} ${quickBuild!.commitSha?.slice(0, 7) ?? 'quick'}`;
|
||||||
@@ -3498,7 +3503,8 @@ function createReleaseImageTags(
|
|||||||
const imageSource = normalizeImageSource(component.imageSource, component.type);
|
const imageSource = normalizeImageSource(component.imageSource, component.type);
|
||||||
if (
|
if (
|
||||||
!images[component.name]
|
!images[component.name]
|
||||||
&& (imageSource === 'EXTERNAL' || imageSource === 'DATABASE')
|
&& imageSource === 'EXTERNAL'
|
||||||
|
&& component.type !== 'DATABASE'
|
||||||
&& component.externalImage?.trim()
|
&& component.externalImage?.trim()
|
||||||
) {
|
) {
|
||||||
images[component.name] = component.externalImage.trim();
|
images[component.name] = component.externalImage.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user