diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-27 10:20:46 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-27 10:20:48 +0200 |
commit | d02450f6234bd79e58b961c8ca2bfb85a01ec1c2 (patch) | |
tree | 2bd14db06d5c7a09b75b81669ae2a49f99d6d172 /vars | |
parent | d74b5b82ff24fe2972ee0ac6bb51b15658d93197 (diff) | |
download | vyos-build-d02450f6234bd79e58b961c8ca2bfb85a01ec1c2.tar.gz vyos-build-d02450f6234bd79e58b961c8ca2bfb85a01ec1c2.zip |
Jenkins: lib: specify when { beforeAgent true }
By default, the when condition for a stage will be evaluated after entering the
agent for that stage, if one is defined. However, this can be changed by
specifying the beforeAgent option within the when block.
If beforeAgent is set to true, the when condition will be evaluated first, and
the agent will only be entered if the when condition evaluates to true.
Diffstat (limited to 'vars')
-rw-r--r-- | vars/buildPackage.groovy | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index 9517a79f..2b16c472 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -40,6 +40,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP label "ec2_amd64" } when { + beforeAgent true anyOf { changeset pattern: changesPattern, caseSensitive: true changeset pattern: "**/data/defaults.json", caseSensitive: true @@ -67,6 +68,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP } stage('Build Code') { when { + beforeAgent true anyOf { changeset pattern: changesPattern, caseSensitive: true triggeredBy cause: "UserIdCause" @@ -126,6 +128,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP } stage("Finalize") { when { + beforeAgent true anyOf { changeset pattern: changesPattern, caseSensitive: true triggeredBy cause: "UserIdCause" |