diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-04 22:27:00 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-06-04 22:27:00 +0200 |
commit | 5a287919fa9dbb5d5a44cd725b0b02e5e3d027ff (patch) | |
tree | f578c6f0eaffb76dcccbe0f8b8439a0563307dc5 /vars | |
parent | 24804b2e00866486d4b16e727a25fc43185e8762 (diff) | |
download | vyos-build-5a287919fa9dbb5d5a44cd725b0b02e5e3d027ff.tar.gz vyos-build-5a287919fa9dbb5d5a44cd725b0b02e5e3d027ff.zip |
Jenkins: lib: only define BASE_DIR and CHANGESET_DIR varibale once
Diffstat (limited to 'vars')
-rw-r--r-- | vars/buildPackage.groovy | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index 511867a6..ca901481 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -37,6 +37,11 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { agent { label "ec2_amd64" } + environment { + // get relative directory path to Jenkinsfile + BASE_DIR = getJenkinsfilePath() + CHANGESET_DIR = getChangeSetPath() + } steps { script { // create container name on demand @@ -68,11 +73,6 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { reuseNode true } } - environment { - // get relative directory path to Jenkinsfile - BASE_DIR = getJenkinsfilePath() - CHANGESET_DIR = getChangeSetPath() - } steps { script { cloneAndBuild(description, 'amd64', pkgList, buildCmd) @@ -100,11 +100,6 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) { when { equals expected: true, actual: buildArm } - environment { - // get relative directory path to Jenkinsfile - BASE_DIR = getJenkinsfilePath() - CHANGESET_DIR = getChangeSetPath() - } steps { script { cloneAndBuild(description, 'arm64', pkgList, buildCmd) |