diff options
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index d46fdcbf..4bc64b26 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,29 +21,61 @@ pipeline { dockerfile { filename 'Dockerfile' label 'jessie-amd64' - args '--privileged' + dir 'docker' + args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006' } } stages { - stage('Configure') { + stage('Submodule Init') { steps { - sh './configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/"' + sh ''' + git submodule update --init --recursive --remote + ''' } } + stage('Build Packages') { + steps { + sh ''' + #!/bin/sh + scripts/build-submodules --verbose + ''' + } + } + stage('Build ISO') { steps { - sh 'sudo make iso' + sh ''' + #!/bin/sh + + # we do not want to fetch VyOS packages from the mirror, + # we rather prefer all build by ourself! + sed -i '/vyos_repo_entry/d' scripts/live-build-config + + # Configure the ISO + ./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/" + + # Debug to see which Debian packages we have so far + ls -al packages/*.deb + + # Finally build our ISO + sudo make iso + ''' } } } post { - always { + cleanup { echo 'One way or another, I have finished' - // change build dir file permissions so wen can cleanup as regular - // user (jenkins) afterwards - sh 'sudo chmod -R 777 .' + // the 'build' directory got elevated permissions during the build + // cdjust permissions so it can be cleaned up by the regular user + sh ''' + #!/bin/bash + if [ -d build ]; then + sudo chmod -R 777 build/ + fi + ''' deleteDir() /* cleanup our workspace */ } } |