jenkins/mmc: added cleaning leftovers in perparing stage
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
f08b93c154
commit
d28fa7cd28
|
|
@ -20,7 +20,8 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
IMG_OUTPUT_DIR = "tmp/build-output"
|
WORK_DIR = "tmp"
|
||||||
|
IMG_OUTPUT_DIR = "${WORK_DIR}/build-output"
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
|
@ -44,6 +45,8 @@ pipeline {
|
||||||
error("Missing machine type --> select parameter MACHINE for a proper build")
|
error("Missing machine type --> select parameter MACHINE for a proper build")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanLeftOvers(env.IMG_OUTPUT_DIR)
|
||||||
|
|
||||||
// this definition is needed for selecting the
|
// this definition is needed for selecting the
|
||||||
// correct build directory
|
// correct build directory
|
||||||
env.BUILD_DIR_POSTFIX = ""
|
env.BUILD_DIR_POSTFIX = ""
|
||||||
|
|
@ -99,6 +102,7 @@ pipeline {
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
|
cleanLeftOvers(env.WORK_DIR)
|
||||||
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
|
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -135,6 +139,11 @@ def printJobParameters() {
|
||||||
----------------------------------\n"
|
----------------------------------\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
def cleanLeftOvers(cleaningDir) {
|
||||||
|
sh "rm -rf ${cleaningDir}"
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
def build(imgType) {
|
def build(imgType) {
|
||||||
def tgtImgType = "${imgType}" == "bootloader" ? "dev" : "${imgType}"
|
def tgtImgType = "${imgType}" == "bootloader" ? "dev" : "${imgType}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue