Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test InfrastructureStage does not honor branchToEnvironmentMapping #1077

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 4 additions & 0 deletions src/org/ods/component/InfrastructureStage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down