summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2019-05-13 15:58:00 +0200
committerKim Hagen <kim.sidney@gmail.com>2019-05-13 15:58:00 +0200
commit9e64a6f67ff7cf669d1da8170f747082988f30c2 (patch)
treee159b3b2e58cd0f94f3032b9f2a99708557920e4
parent2392d2acdff02dbf3d04b6a7eb08c195bd3a6168 (diff)
downloadlibnss-mapuser-9e64a6f67ff7cf669d1da8170f747082988f30c2.tar.gz
libnss-mapuser-9e64a6f67ff7cf669d1da8170f747082988f30c2.zip
Create Jenkinsfile current
-rw-r--r--Jenkinsfile147
1 files changed, 147 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..d7d98d8
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,147 @@
+pipeline {
+ agent none
+ stages {
+ stage('build-package') {
+ parallel {
+ stage('Build package amd64') {
+ agent {
+ docker {
+ label 'jessie-amd64'
+ args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
+ image 'higebu/vyos-build:current'
+ }
+
+ }
+ steps {
+ sh '''#!/bin/bash
+git clone --single-branch --branch $GIT_BRANCH $GIT_URL $BUILD_NUMBER
+cd $BUILD_NUMBER
+sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control
+dpkg-buildpackage -b -us -uc -tc
+mv ../*.deb .'''
+ }
+ }
+ stage('Build package armhf') {
+ agent {
+ docker {
+ label 'jessie-amd64'
+ image 'vyos-build-armhf:current'
+ args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
+ }
+
+ }
+ steps {
+ sh '''#!/bin/bash
+git clone --single-branch --branch $GIT_BRANCH $GIT_URL $BUILD_NUMBER
+cd $BUILD_NUMBER
+sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control
+dpkg-buildpackage -b -us -uc -tc
+mv ../*.deb .'''
+ }
+ }
+ 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'
+ image 'vyos-build-arm64:current'
+ }
+
+ }
+ steps {
+ sh '''#!/bin/bash
+git clone --single-branch --branch $GIT_BRANCH $GIT_URL $BUILD_NUMBER
+cd $BUILD_NUMBER
+sudo mk-build-deps -i -r -t \'apt-get --no-install-recommends -yq\' debian/control
+dpkg-buildpackage -b -us -uc -tc
+mv ../*.deb .'''
+ }
+ }
+ }
+ }
+ 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 package arm64') {
+ agent {
+ node {
+ label 'jessie-amd64'
+ }
+
+ }
+ steps {
+ sh '''#!/bin/bash
+cd $BUILD_NUMBER
+mv *.deb ../
+/var/lib/vyos-build/pkg-build.sh $GIT_BRANCH'''
+ }
+ }
+ }
+ }
+ stage('Cleanup') {
+ parallel {
+ stage('Cleanup amd64') {
+ agent {
+ node {
+ label 'jessie-amd64'
+ }
+
+ }
+ steps {
+ cleanWs()
+ }
+ }
+ stage('Cleanup armhf') {
+ agent {
+ node {
+ label 'jessie-amd64'
+ }
+
+ }
+ steps {
+ cleanWs()
+ }
+ }
+ stage('Cleanup arm64') {
+ agent {
+ node {
+ label 'jessie-amd64'
+ }
+
+ }
+ steps {
+ cleanWs()
+ }
+ }
+ }
+ }
+ }
+}
+