Skip to content

Commit

Permalink
Move evaluation of testEnvironment in node block
Browse files Browse the repository at this point in the history
  • Loading branch information
Larusso committed Aug 31, 2023
1 parent b2369ee commit 879bac1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/wooga/jenkins/pipeline/check/EnclosureCreator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class EnclosureCreator {
}

Closure withNodeAndEnv(Platform platform, PackedStep mainCls, Closure catchCls, PackedStep finallyCls) {
def testEnvironment = platform.testEnvironment +
["TRAVIS_JOB_NUMBER=${buildNumber}.${platform.name.toUpperCase()}"]
return {
def platformLabels = platform.generateTestLabelsString()
def nodeLabels = platformLabels && !platformLabels.empty ?
"atlas && ${platform.generateTestLabelsString()}" : "atlas"
jenkins.node(nodeLabels) {
def testEnvironment = platform.testEnvironment +
["TRAVIS_JOB_NUMBER=${buildNumber}.${platform.name.toUpperCase()}"]
jenkins.withEnv(testEnvironment) {
try {
mainCls.call()
Expand Down

0 comments on commit 879bac1

Please sign in to comment.