diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-06 11:29:44 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-01-06 14:24:49 +0100 |
commit | d0d363186d180f9d16d0d33983e088726214f25d (patch) | |
tree | afc8566ff11a22e10d4777606e284fc0a517fc02 | |
parent | 3bd3fda4c03d020a62b9a43d50692ccee7996886 (diff) | |
download | vyos-build-d0d363186d180f9d16d0d33983e088726214f25d.tar.gz vyos-build-d0d363186d180f9d16d0d33983e088726214f25d.zip |
CI/CD: extend error reporting for Jenkins builds
-rw-r--r-- | Jenkinsfile | 6 | ||||
-rwxr-xr-x | scripts/build-submodules | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 6db29fe..37bdeee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,14 +145,10 @@ pipeline { sh 'scripts/build-submodules' } } - stage('Show Dir') { + stage('Build ISO') { steps { sh 'ls -al' sh 'ls -al packages' - } - } - stage('Build ISO') { - steps { sh 'sudo make iso' } } diff --git a/scripts/build-submodules b/scripts/build-submodules index 43568cf..294f540 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -1,5 +1,5 @@ -#!/bin/bash -#set -x +#!/bin/bash + if [ ! -d "packages" ]; then echo "This script needs to be executed inside the top root of vyos-build" exit 1 @@ -13,7 +13,7 @@ if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then echo "or from the vyos-builder docker container" echo "docker instructions" echo "Build the container:" - echo " docker build -t vyos-builder ." + echo " docker build -t vyos-builder ." echo "Compile packages:" echo " docker run --rm -it -v $(pwd):/vyos -w /vyos --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos-builder scripts/build-docker-subpaclages" fi @@ -112,6 +112,7 @@ if [ -f "packages/vyos-kernel/Makefile" ]; then bash -c '../../scripts/build-kernel' >$PKGDIR/vyos-kernel.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail + cat $PKGDIR/vyos-kernel.buildlog error_msg "Failed to build package vyos-kernel, look in vyos-kernel.buildlog to examine the fault\n" else VERSION=$(grep "^VERSION" Makefile | grep -Eo '[0-9]{1,4}') @@ -142,6 +143,7 @@ if [ -d "packages/vyos-wireguard/debian" ]; then bash -c 'KERNELDIR=/vyos/packages/vyos-kernel dpkg-buildpackage -uc -us -tc -b' >$PKGDIR/vyos-wireguard.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail + cat $PKGDIR/vyos-wireguard.buildlog error_msg "Failed to build package vyos-wireguard, look in vyos-wireguard.buildlog to examine the fault\n" else status_ok @@ -154,7 +156,7 @@ if [ -d "packages/vyos-wireguard/debian" ]; then else seeor_msg "Something wrong with the kernel module?" fi -else +else status_skip "No source for: vyos-wireguard" fi @@ -175,6 +177,7 @@ if [ -d "packages/vyos-accel-ppp/debian" ]; then KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b >$PKGDIR/vyos-accel-ppp.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail + cat $PKGDIR/vyos-accel-ppp.buildlog error_msg "Failed to build package vyos-accel-ppp, look in vyos-accel-ppp.buildlog to examine the fault\n" else status_ok |