jenkins/mmc: added cleaning leftovers in perparing stage

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmueller 2021-07-29 15:55:22 +02:00
parent f08b93c154
commit d28fa7cd28
1 changed files with 10 additions and 1 deletions

View File

@ -20,7 +20,8 @@ pipeline {
}
environment {
IMG_OUTPUT_DIR = "tmp/build-output"
WORK_DIR = "tmp"
IMG_OUTPUT_DIR = "${WORK_DIR}/build-output"
}
options {
@ -44,6 +45,8 @@ pipeline {
error("Missing machine type --> select parameter MACHINE for a proper build")
}
cleanLeftOvers(env.IMG_OUTPUT_DIR)
// this definition is needed for selecting the
// correct build directory
env.BUILD_DIR_POSTFIX = ""
@ -99,6 +102,7 @@ pipeline {
post {
always {
script {
cleanLeftOvers(env.WORK_DIR)
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
}
}
@ -135,6 +139,11 @@ def printJobParameters() {
----------------------------------\n"
}
//-----------------------------------------------------------------------------
def cleanLeftOvers(cleaningDir) {
sh "rm -rf ${cleaningDir}"
}
//-----------------------------------------------------------------------------
def build(imgType) {
def tgtImgType = "${imgType}" == "bootloader" ? "dev" : "${imgType}"