From 6d667dc9e7d2ea942f34aa20c2e9a2ce4d9b9c26 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Fri, 11 Sep 2020 14:58:33 +0200 Subject: [PATCH] Jenkinsfile: Modifiy build-type by "release" checkbox --- Jenkinsfile | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a3a731e..1eee71f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 {