diff options
author | Kim <kim.sidney@gmail.com> | 2019-05-13 22:15:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 22:15:39 +0200 |
commit | 5f2dfa979a11ea012f00043d82aabddd8be8fbae (patch) | |
tree | db6d6c3d66c2dbc963d5b2320372f008f543c6ad | |
parent | 2bc0879423c5bb4dc6cd1983aa62f4b507769dbf (diff) | |
download | libnss-mapuser-5f2dfa979a11ea012f00043d82aabddd8be8fbae.tar.gz libnss-mapuser-5f2dfa979a11ea012f00043d82aabddd8be8fbae.zip |
Update Jenkinsfile
-rw-r--r-- | Jenkinsfile | 71 |
1 files changed, 20 insertions, 51 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 07adf82..0319b92 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { agent { docker { label 'jessie-amd64' - args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' + args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006 -v /tmp:/tmp' image 'higebu/vyos-build:crux' } @@ -19,7 +19,8 @@ cd $BUILD_NUMBER sudo apt-get -o Acquire::Check-Valid-Until=false update sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control dpkg-buildpackage -b -us -uc -tc -mv ../*.deb .''' +mkdir -p /tmp/$GIT_BRANCH/packages/script +mv ../*.deb /tmp/$GIT_BRANCH/packages/''' } } stage('Build package armhf') { @@ -27,7 +28,7 @@ mv ../*.deb .''' docker { label 'jessie-amd64' image 'vyos-build-armhf:crux' - args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' + args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006 -v /tmp:/tmp' } } @@ -38,14 +39,15 @@ cd $BUILD_NUMBER sudo apt-get -o Acquire::Check-Valid-Until=false update sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control dpkg-buildpackage -b -us -uc -tc -mv ../*.deb .''' +mkdir -p /tmp/$GIT_BRANCH/packages/script +mv ../*.deb /tmp/$GIT_BRANCH/packages/''' } } stage('Build package arm64') { agent { docker { label 'jessie-amd64' - args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' + args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006 -v /tmp:/tmp' image 'vyos-build-arm64:crux' } @@ -57,55 +59,23 @@ cd $BUILD_NUMBER sudo apt-get -o Acquire::Check-Valid-Until=false update sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control dpkg-buildpackage -b -us -uc -tc -mv ../*.deb .''' +mkdir -p /tmp/$GIT_BRANCH/packages/script +mv ../*.deb /tmp/$GIT_BRANCH/packages/''' } } } } - stage('Deploy package') { - parallel { - stage('Deploy package amd64') { - agent { - node { - label 'jessie-amd64' - } - - } - steps { - sh '''#!/bin/bash -cd $BUILD_NUMBER -mv *.deb ../ -/var/lib/vyos-build/pkg-build.sh $GIT_BRANCH''' - } - } - stage('Deploy package armhf') { - agent { - node { - label 'jessie-amd64' - } - - } - steps { - sh '''#!/bin/bash -cd $BUILD_NUMBER -mv *.deb ../ -/var/lib/vyos-build/pkg-build.sh $GIT_BRANCH''' - } + stage('Deploy packages') { + agent { + node { + label 'jessie-amd64' } - stage('Deploy package arm64') { - agent { - node { - label 'jessie-amd64' - } - } - steps { - sh '''#!/bin/bash -cd $BUILD_NUMBER -mv *.deb ../ + } + steps { + sh '''#!/bin/bash +cd /tmp/$GIT_BRANCH/packages/script /var/lib/vyos-build/pkg-build.sh $GIT_BRANCH''' - } - } } } stage('Cleanup') { @@ -118,7 +88,7 @@ mv *.deb ../ } steps { - cleanWs() + cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, cleanupMatrixParent: true, deleteDirs: true, disableDeferredWipeout: true) } } stage('Cleanup armhf') { @@ -129,7 +99,7 @@ mv *.deb ../ } steps { - cleanWs() + cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, cleanupMatrixParent: true, deleteDirs: true, disableDeferredWipeout: true) } } stage('Cleanup arm64') { @@ -140,11 +110,10 @@ mv *.deb ../ } steps { - cleanWs() + cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, cleanupMatrixParent: true, deleteDirs: true, disableDeferredWipeout: true) } } } } } } - |