jobs: added job parameter to force the source revision update
With the latest version where the nightly branch is forwarded to the build job, the source revision update is no longer necessary. But in case of a manual trigger of the build job it makes sense to keep the functionality. Thus, an additional parameter is introduced to the build target job. With it the nightly job and the common files are updated too. Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
6277bc44bb
commit
652739e0f0
|
|
@ -192,6 +192,7 @@ def runBuildJob(commonHelpers, buildTarget, buildBranch) {
|
|||
booleanParam(name: 'CLEAN_BUILD', value: params.CLEAN_BUILD),
|
||||
booleanParam(name: 'DEPLOY_TO_NEXUS', value: params.DEPLOY_TO_NEXUS),
|
||||
booleanParam(name: 'SKIP_SSTATE_UPLOAD', value: params.SKIP_SSTATE_UPLOAD),
|
||||
booleanParam(name: 'FORCE_SRC_REV_UPDATE', value: false),
|
||||
booleanParam(name: 'DEBUGGING', value: params.DEBUGGING)]
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ pipeline {
|
|||
booleanParam(name: 'CLEAN_BUILD', defaultValue: false, description: 'do a clean build, i.e. remove the yocto directory and start from scratch')
|
||||
booleanParam(name: 'DEPLOY_TO_NEXUS', defaultValue: true, description: 'deploy the built artifact to Nexus')
|
||||
booleanParam(name: 'SKIP_SSTATE_UPLOAD', defaultValue: false, description: 'skip uploading/synchronizing the sstate-cache to the mirror')
|
||||
booleanParam(name: 'FORCE_SRC_REV_UPDATE', defaultValue: false, description: 'force a source revision update, e.g. when you are triggering this job manually')
|
||||
booleanParam(name: 'DEBUGGING', defaultValue: false, description: 'debugging mode, removes quiet mode for bitbake')
|
||||
}
|
||||
|
||||
|
|
@ -121,12 +122,13 @@ def printJobParameters() {
|
|||
println "----------------------------------\n\
|
||||
Job Parameters:\n\
|
||||
----------------------------------\n\
|
||||
TARGET = ${params.TARGET}\n\
|
||||
BUILD_BRANCH = ${params.BUILD_BRANCH}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
DEPLOY_TO_NEXUS = ${params.DEPLOY_TO_NEXUS}\n\
|
||||
SKIP_SSTATE_UPLOAD = ${params.SKIP_SSTATE_UPLOAD}\n\
|
||||
DEBUGGING = ${params.DEBUGGING}\n\
|
||||
TARGET = ${params.TARGET}\n\
|
||||
BUILD_BRANCH = ${params.BUILD_BRANCH}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
DEPLOY_TO_NEXUS = ${params.DEPLOY_TO_NEXUS}\n\
|
||||
SKIP_SSTATE_UPLOAD = ${params.SKIP_SSTATE_UPLOAD}\n\
|
||||
FORCE_SRC_REV_UPDATE = ${params.FORCE_SRC_REV_UPDATE}\n\
|
||||
DEBUGGING = ${params.DEBUGGING}\n\
|
||||
----------------------------------\n"
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +153,7 @@ def setupEnvironment(commonHelpers) {
|
|||
def machine = "${env.TARGET}"
|
||||
def nwlBranch = "${params.BUILD_BRANCH}"
|
||||
def nwlRepoDir = "${env.YOCTO_REPO_DIR}"
|
||||
commonHelpers.setupBuildEnvironment(machine, nwlBranch, nwlRepoDir, params.DEBUGGING)
|
||||
commonHelpers.setupBuildEnvironment(machine, nwlBranch, nwlRepoDir, params.DEBUGGING, params.FORCE_SRC_REV_UPDATE)
|
||||
commonHelpers.printEnvironmentParameters()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ def setupEnvironmentForArtifacts(machine) {
|
|||
env.YOCTO_ARTIFACTS = "${env.YOCTO_DEPLOYS}/${env.BITBAKE_PKG}-${machine}.ci-artifacts"
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
def setupBuildEnvironment(machine, branchTag, cloneDir, isDebug) {
|
||||
def setupBuildEnvironment(machine, branchTag, cloneDir, isDebug, isSrcRevUpdateForced) {
|
||||
// with the machine parameter it will be possible to set up different
|
||||
// environment variables in here. Currently we use the SolidRun board
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ def setupBuildEnvironment(machine, branchTag, cloneDir, isDebug) {
|
|||
env.BITBAKE_CMD = "${env.ISQUIET} ${env.BITBAKE_PKG}"
|
||||
|
||||
removePreExistingYoctoConfigs(confPath)
|
||||
gitCheckout("${env.YOCTO_REPO_URL}", branchTag, cloneDir, true)
|
||||
gitCheckout("${env.YOCTO_REPO_URL}", branchTag, cloneDir, true, isSrcRevUpdateForced)
|
||||
|
||||
env.PKG_NAME = "${env.BITBAKE_PKG}-${machine}"
|
||||
sh("mkdir -p ${env.DEPLOY_CONTENT_DIR}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue