Jenkinsfiles: integrated updating only netmodule layers in split job files
Within the big jenkins file only the netmodule layers are updated when the release string is empty of latest. This change is now integrated into the split jenkins files. BugzID: 73564 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
8a477f0117
commit
9321361765
|
|
@ -30,15 +30,16 @@ def isRelease(versionParam) {
|
|||
}
|
||||
|
||||
|
||||
def handleSubmodules(isForcedToHead) {
|
||||
def handleSubmodules(versionParam) {
|
||||
println "init submodules..."
|
||||
sh 'git submodule init'
|
||||
if(isForcedToHead) {
|
||||
println "setting submodule hashes to head..."
|
||||
sh 'git submodule update --remote --rebase' // update all submodules to HEAD
|
||||
sh 'git submodule update --init'
|
||||
if(isRelease(versionparam)) {
|
||||
println "set submodules to freezed state..."
|
||||
sh 'git submodule update' // set all submodules to freezed commit
|
||||
}
|
||||
else {
|
||||
sh 'git submodule update' // set all submodules to freezed commit
|
||||
println "setting netmodule submodule hashes to head..."
|
||||
sh 'git submodule update --remote --rebase meta-netmodule-*' // update our own submodules to HEAD
|
||||
}
|
||||
submoduleStatus = sh(returnStdout: true, script: "git submodule status").trim() // print submodule hashes to jenkins log
|
||||
println "${submoduleStatus}"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ pipeline {
|
|||
choice(name: 'IMAGE_TYPE', choices: ['lava', 'fct', 'minimal'], description: 'choose image type')
|
||||
string(name: 'RLS_VERSION', defaultValue: '', description: 'Set the version to build and use committed submodules')
|
||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: false, description: 'clean all temp directories before build starts')
|
||||
booleanParam(name: 'DO_UPDATE_TO_HEAD', defaultValue: false, description: 'update submodules to head')
|
||||
}
|
||||
|
||||
environment {
|
||||
|
|
@ -50,7 +49,7 @@ pipeline {
|
|||
|
||||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.BUILD_DEPLOY_DIR}/${params.MACHINE}"
|
||||
yoctocommon.handleSubmodules(params.DO_UPDATE_TO_HEAD)
|
||||
yoctocommon.handleSubmodules("${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
|
||||
|
|
@ -112,7 +111,6 @@ def printJobParameters() {
|
|||
MACHINE = ${params.MACHINE}\n\
|
||||
IMAGE_TYPE = ${params.IMAGE_TYPE}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
UPDATE_TO_HEAD = ${params.DO_UPDATE_TO_HEAD}\n\
|
||||
RLS_VERSION = ${params.RLS_VERSION}\n\
|
||||
--> version = ${env.BUILD_VERSION}\n\
|
||||
----------------------------------\n"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ pipeline {
|
|||
choice(name: 'IMAGE_TYPE', choices: ['dev', 'bootloader', 'release'], description: 'choose image type')
|
||||
string(name: 'RLS_VERSION', defaultValue: '', description: 'Set the version to build and use committed submodules')
|
||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: false, description: 'clean all temp directories before build starts')
|
||||
booleanParam(name: 'DO_UPDATE_TO_HEAD', defaultValue: false, description: 'update submodules to head')
|
||||
}
|
||||
|
||||
environment {
|
||||
|
|
@ -50,7 +49,7 @@ pipeline {
|
|||
|
||||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.BUILD_DEPLOY_DIR}/${params.MACHINE}"
|
||||
yoctocommon.handleSubmodules(params.DO_UPDATE_TO_HEAD)
|
||||
yoctocommon.handleSubmodules("${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
|
||||
|
|
@ -113,7 +112,6 @@ def printJobParameters() {
|
|||
MACHINE = ${params.MACHINE}\n\
|
||||
IMAGE_TYPE = ${params.IMAGE_TYPE}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
UPDATE_TO_HEAD = ${params.DO_UPDATE_TO_HEAD}\n\
|
||||
RLS_VERSION = ${params.RLS_VERSION}\n\
|
||||
--> version = ${env.BUILD_VERSION}\n\
|
||||
----------------------------------\n"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ pipeline {
|
|||
choice(name: 'MACHINE', choices: ['select...', 'am335x-nrhw20', 'am335x-nmhw21', 'imx8-nmhw23', 'am335x-nmhw24', 'am335x-hw25', 'am335x-hw26'], description: 'choose target platform')
|
||||
string(name: 'RLS_VERSION', defaultValue: '', description: 'Set the version to build and use committed submodules')
|
||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: false, description: 'clean all temp directories before build starts')
|
||||
booleanParam(name: 'DO_UPDATE_TO_HEAD', defaultValue: true, description: 'update submodules to head')
|
||||
booleanParam(name: 'BUILD_FROM_DEV_IMAGE', defaultValue: false, description: 'build SDK from dev image')
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +50,7 @@ pipeline {
|
|||
|
||||
// Prepare Build Environment
|
||||
env.YOCTO_DEPLOYS = "${env.SHARED_BUILD}/tmp/deploy/sdk"
|
||||
yoctocommon.handleSubmodules(params.DO_UPDATE_TO_HEAD)
|
||||
yoctocommon.handleSubmodules("${params.RLS_VERSION}")
|
||||
version = yoctocommon.getVersionString("${params.RLS_VERSION}", "sdk")
|
||||
env.BUILD_VERSION = "${version}"
|
||||
currentBuild.displayName = "${version}-${params.MACHINE}-sdk" //replace Bitbake timestamp after building
|
||||
|
|
@ -116,7 +115,6 @@ def printJobParameters() {
|
|||
----------------------------------\n\
|
||||
MACHINE = ${params.MACHINE}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
UPDATE_TO_HEAD = ${params.DO_UPDATE_TO_HEAD}\n\
|
||||
IS_NM_LINUX_SDK = ${env.IS_NM_LINUX_SDK}\n\
|
||||
RLS_VERSION = ${params.RLS_VERSION}\n\
|
||||
--> version = ${env.BUILD_VERSION}\n\
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ pipeline {
|
|||
|
||||
def printJobParameters() {
|
||||
println "----------------------------------\n\
|
||||
Job Parameters:\n\
|
||||
----------------------------------\n\
|
||||
UPDATE_NM_PARTS = ${params.UPDATE_NM_PARTS}\n\
|
||||
UPDATE_COMMUNITY_PARTS = ${params.UPDATE_COMMUNITY_PARTS}\n\
|
||||
----------------------------------\n"
|
||||
Job Parameters:\n\
|
||||
----------------------------------\n\
|
||||
UPDATE_NM_PARTS = ${params.UPDATE_NM_PARTS}\n\
|
||||
UPDATE_COMMUNITY_PARTS = ${params.UPDATE_COMMUNITY_PARTS}\n\
|
||||
----------------------------------\n"
|
||||
}
|
||||
|
||||
def prepareUpdate() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue