summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-01-26 10:04:13 +0100
committerChristian Poessinger <christian@poessinger.com>2019-01-26 10:04:13 +0100
commitfdf47c42269f7adb7d5f3e60b8180e8b9bc77503 (patch)
tree3b86a1a9bf6b585ab87f825d94a6a7c511dcebdd
parentb4dfb255edab84f8f1461492eed5425ff9e80df5 (diff)
downloadvyos-build-fdf47c42269f7adb7d5f3e60b8180e8b9bc77503.tar.gz
vyos-build-fdf47c42269f7adb7d5f3e60b8180e8b9bc77503.zip
Jenkins: cleanup
-rw-r--r--Jenkinsfile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index d1d8ad95..4bc64b26 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -30,14 +30,16 @@ pipeline {
stage('Submodule Init') {
steps {
sh '''
- git submodule update --init --recursive
- git submodule update --remote
+ git submodule update --init --recursive --remote
'''
}
}
stage('Build Packages') {
steps {
- sh 'scripts/build-submodules --verbose'
+ sh '''
+ #!/bin/sh
+ scripts/build-submodules --verbose
+ '''
}
}
@@ -68,7 +70,12 @@ pipeline {
echo 'One way or another, I have finished'
// the 'build' directory got elevated permissions during the build
// cdjust permissions so it can be cleaned up by the regular user
- sh 'sudo chmod -R 777 build/'
+ sh '''
+ #!/bin/bash
+ if [ -d build ]; then
+ sudo chmod -R 777 build/
+ fi
+ '''
deleteDir() /* cleanup our workspace */
}
}