summaryrefslogtreecommitdiff
path: root/vars
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-08 19:50:38 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-08 19:50:38 +0100
commit65bece336b59a8bdfa3561bb670425df09aad013 (patch)
treeeb79453fd5933218f7668a9da03dd05879327b14 /vars
parentb32e9ffa92de2d32255c4c0e0f7d9a364323cd9a (diff)
downloadvyos-build-65bece336b59a8bdfa3561bb670425df09aad013.tar.gz
vyos-build-65bece336b59a8bdfa3561bb670425df09aad013.zip
Jenkins: cleanup before build
Diffstat (limited to 'vars')
-rw-r--r--vars/cloneAndBuild.groovy7
1 files changed, 5 insertions, 2 deletions
diff --git a/vars/cloneAndBuild.groovy b/vars/cloneAndBuild.groovy
index 4c3c937a..f945ba75 100644
--- a/vars/cloneAndBuild.groovy
+++ b/vars/cloneAndBuild.groovy
@@ -18,7 +18,10 @@ def call(description, architecture, pkgList, buildCmd) {
// package build must be done in "any" subdir. Without it the Debian build system
// is unable to generate the *.deb files in the sources parent directory, which
// will cause a "Permission denied" error.
- dir ('build') {
+ dir ("build-${architecture}") {
+ // cleanup
+ deleteDir()
+
// checkout git repository which hold 'Jenkinsfile'
checkout scm
@@ -51,7 +54,7 @@ def call(description, architecture, pkgList, buildCmd) {
} else if (buildCmd) {
sh buildCmd
} else {
- sh "dpkg-buildpackage -uc -us -tc -b"
+ sh 'dpkg-buildpackage -uc -us -tc -b'
}
}
if (architecture == 'amd64') {