diff --git a/CHANGELOG.md b/CHANGELOG.md index 22da6e21e..4687bd842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix InfrastructureStage (org.ods.component) does not honor branchToEnvironmentMapping ([#1076](https://github.com/opendevstack/ods-jenkins-shared-library/issues/1076)) * Fix Tailor deployment drifts for D, Q envs ([#1055](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1055)) * Update api version in ocp templates for image, buildconfig, route and deploymentconfig ([#1072](https://github.com/opendevstack/ods-jenkins-shared-library/issues/1072)) diff --git a/src/org/ods/component/InfrastructureStage.groovy b/src/org/ods/component/InfrastructureStage.groovy index 18ebbe91e..05458181f 100644 --- a/src/org/ods/component/InfrastructureStage.groovy +++ b/src/org/ods/component/InfrastructureStage.groovy @@ -45,6 +45,10 @@ class InfrastructureStage extends Stage { // called from odsComponentStageInfrustructure execute @TypeChecked(TypeCheckingMode.SKIP) protected run() { + if (!context.environment) { + logger.warn('Skipping image import because of empty (target) environment ...') + return + } if (runMakeStage("test", this.options.cloudProvider, environmentVarsTesting, tfBackendS3Key, null as String) != 0) { script.error("IaC - Testing stage failed!")