diff --git a/Jenkinsfile_mmcImages b/Jenkinsfile_mmcImages index d6d395b..1ee5098 100644 --- a/Jenkinsfile_mmcImages +++ b/Jenkinsfile_mmcImages @@ -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}"