Jenkinsfile: Modifiy build-type by "release" checkbox
This commit is contained in:
parent
247bcbe0aa
commit
6d667dc9e7
|
|
@ -9,7 +9,7 @@ pipeline {
|
|||
parameters {
|
||||
choice(name: 'MACHINE_TYPE', choices: ['am335x-nmhw21','imx8-nmhw23'], description: 'choose target platform')
|
||||
choice(name: 'IMAGE_TYPE', choices: ['bootloader', 'release', 'dev', 'vcu', 'lava', 'sdk'], description: 'choose target platform')
|
||||
choice(name: 'BUILD_TYPE', choices: ['nightly','release','develop'], description: 'choose the build type')
|
||||
booleanParam(name: 'RELEASE_BUILD', defaultValue: false, description: ' use latest tagged release intead of latest versions')
|
||||
booleanParam(name: 'CLEAN_BUILD', defaultValue: false, description: 'clean all temp directories before build starts')
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ pipeline {
|
|||
stage('prepare') {
|
||||
steps {
|
||||
script {
|
||||
if(params.BUILD_TYPE == 'release') {
|
||||
if(params.RELEASE_BUILD) {
|
||||
sh 'git submodule update' // set all submodules to freezed commit
|
||||
currentBuild.rawBuild.keepLog(true) // keep this build forever
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ pipeline {
|
|||
println "----------------------------------\n Job Parameters:\n----------------------------------\n\
|
||||
MACHINE_TYPE = ${params.MACHINE_TYPE}\n\
|
||||
IMAGE_TYPE = ${params.IMAGE_TYPE}\n\
|
||||
BUILD_TYPE = ${params.BUILD_TYPE}\n\
|
||||
RELEASE_BUILD = ${params.RELEASE_BUILD}\n\
|
||||
CLEAN_BUILD = ${params.CLEAN_BUILD}\n\
|
||||
----------------------------------\n"
|
||||
|
||||
|
|
@ -71,17 +71,6 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('archive') {
|
||||
when { environment name: 'BUILD_TYPE', value: 'release' }
|
||||
steps {
|
||||
sh "git-archive-all --extra VERSION ${PACKAGE_NAME}-${BUILD_VERSION}-git-archive.tar.gz"
|
||||
archiveArtifacts artifacts: "${PACKAGE_NAME}-${BUILD_VERSION}-git-archive.tar.gz", onlyIfSuccessful: true
|
||||
}
|
||||
post {
|
||||
success { sh "rm ${PACKAGE_NAME}-${BUILD_VERSION}-git-archive.tar.gz" }
|
||||
}
|
||||
}
|
||||
|
||||
stage('build') {
|
||||
steps {
|
||||
script {
|
||||
|
|
|
|||
Loading…
Reference in New Issue