From 65bece336b59a8bdfa3561bb670425df09aad013 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 8 Feb 2021 19:50:38 +0100 Subject: Jenkins: cleanup before build --- vars/cloneAndBuild.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vars') 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') { -- cgit v1.2.3