summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-08 19:50:17 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-08 19:50:19 +0100
commitb32e9ffa92de2d32255c4c0e0f7d9a364323cd9a (patch)
tree9ecc33eca8163331fd68b5f5718bf2634547cc15
parent92d6d9b7d24d0f530be4f6f1dd5ff02c9b26b540 (diff)
downloadvyos-build-b32e9ffa92de2d32255c4c0e0f7d9a364323cd9a.tar.gz
vyos-build-b32e9ffa92de2d32255c4c0e0f7d9a364323cd9a.zip
Jenkins: simplify passing of Docker options
-rw-r--r--vars/buildPackage.groovy6
1 files changed, 4 insertions, 2 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index d498c78..eea399e 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -39,7 +39,9 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
branchName = '${env.CHANGE_TARGET}'.toLowerCase()
if (branchName.equals('master'))
branchName = 'current'
+
env.DOCKER_IMAGE = 'vyos/vyos-build:' + branchName
+ env.DOCKER_ARGS = '--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
}
}
}
@@ -58,7 +60,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
stage('amd64') {
agent {
docker {
- args "--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006"
+ args "${env.DOCKER_ARGS}"
image "${env.DOCKER_IMAGE}"
alwaysPull true
}
@@ -77,7 +79,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
stage('arm64') {
agent {
docker {
- args "--sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006"
+ args "${env.DOCKER_ARGS}"
image "${env.DOCKER_IMAGE}-arm64"
alwaysPull true
}