jenkins: added autorevision handling to mmc-, ramdisk and sdk pipelines
BugzID: 75209 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
e549b2b7fc
commit
fc4dd66c9f
|
|
@ -55,6 +55,18 @@ def handleSubmodules(versionParam) {
|
|||
writeFile(file: "${env.SUBMODULE_VERION_FILE}", text: "${submoduleStatus}")
|
||||
}
|
||||
|
||||
def handleAutoRevIncludeFile(versionParam) {
|
||||
if(isRelease(versionParam)) {
|
||||
println "suppressing autorev include file..."
|
||||
sh(script: "sed '/autorev-packages/d' -i ${env.SHARED_BUILD}/conf/local.conf")
|
||||
}
|
||||
}
|
||||
def cleanupAutoRevIncludeFile(versionParam) {
|
||||
if(isRelease(versionParam)) {
|
||||
println "clean-up suppressed autorev include file..."
|
||||
sh(script: "git checkout ${env.SHARED_BUILD}/conf/local.conf")
|
||||
}
|
||||
}
|
||||
|
||||
def updateSourceRevisions() {
|
||||
println "update source revisions to head..."
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ pipeline {
|
|||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.BUILD_DEPLOY_DIR}/${params.MACHINE}"
|
||||
yoctocommon.handleSubmodules("${params.RLS_VERSION}")
|
||||
yoctocommon.handleAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
version = yoctocommon.getVersionString("${params.RLS_VERSION}", "${params.IMAGE_TYPE}")
|
||||
env.BUILD_VERSION = "${version}"
|
||||
currentBuild.displayName = "${version}-${params.MACHINE}-${params.IMAGE_TYPE}" //replace Bitbake timestamp after building
|
||||
|
|
@ -89,6 +90,7 @@ pipeline {
|
|||
post {
|
||||
always {
|
||||
script {
|
||||
yoctocommon.cleanupAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ pipeline {
|
|||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.BUILD_DEPLOY_DIR}/${params.MACHINE}"
|
||||
yoctocommon.handleSubmodules("${params.RLS_VERSION}")
|
||||
yoctocommon.handleAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
version = yoctocommon.getVersionString("${params.RLS_VERSION}", "${params.IMAGE_TYPE}")
|
||||
env.BUILD_VERSION = "${version}"
|
||||
currentBuild.displayName = "${version}-${params.MACHINE}-${params.IMAGE_TYPE}" //replace Bitbake timestamp after building
|
||||
|
|
@ -106,6 +107,7 @@ pipeline {
|
|||
always {
|
||||
script {
|
||||
cleanLeftOvers(env.WORK_DIR)
|
||||
yoctocommon.cleanupAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ pipeline {
|
|||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.SHARED_BUILD}/tmp/deploy/sdk"
|
||||
yoctocommon.handleSubmodules("${params.RLS_VERSION}")
|
||||
yoctocommon.handleAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
cleanLastBuildArtifacts()
|
||||
version = yoctocommon.getVersionString("${params.RLS_VERSION}", "sdk")
|
||||
env.BUILD_VERSION = "${version}"
|
||||
|
|
@ -98,6 +99,7 @@ pipeline {
|
|||
} // success
|
||||
always {
|
||||
script {
|
||||
yoctocommon.cleanupAutoRevIncludeFile("${params.RLS_VERSION}")
|
||||
yoctocommon.syncSources("${env.DOWNLOAD_DIR}", "${env.BINARY_STORAGE_URL}")
|
||||
}
|
||||
} // always
|
||||
|
|
|
|||
Loading…
Reference in New Issue