X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_2.groovy;h=a0c78d1f987a61972508d88f6a1756df77959733;hb=refs%2Ftags%2Fv12.0.7;hp=dc155a194cc362f5bc21608e284f0e011bb7e599;hpb=334792668c1484b748a7fe07e01ad4671793ea21;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy index dc155a19..a0c78d1f 100644 --- a/jenkins/ci-pipelines/ci_stage_2.groovy +++ b/jenkins/ci-pipelines/ci_stage_2.groovy @@ -31,6 +31,7 @@ def project_checkout(url_prefix,project,refspec,revision) { def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifactory_server,docker_args="",do_stage_4=false) { println("do_stage_3= ${do_stage_3}") ci_helper = load "devops/jenkins/ci-pipelines/ci_helper.groovy" + def isMergeJob = JOB_NAME.contains('merge') stage('Prepare') { sh 'env' @@ -41,7 +42,7 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa } stage('License Scan') { - if (!JOB_NAME.contains('merge')) { + if (!isMergeJob) { sh "devops/tools/license_scan.sh" } else { @@ -51,7 +52,7 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa stage('Release Note Check') { if (fileExists('devops-stages/stage-releasenote.sh')) { - if (!JOB_NAME.contains('merge')) { + if (!isMergeJob) { sh "devops-stages/stage-releasenote.sh" } else { @@ -99,8 +100,8 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa } } - if (fileExists('snap/snapcraft.yaml')) { - stage('Snap build') { + stage('Snap build') { + if (fileExists('snap/snapcraft.yaml')) { withCredentials([string(credentialsId: 'Snapstore', variable: 'SNAPCRAFT_STORE_CREDENTIALS')]) { sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/ ${WORKSPACE}/*.snap" sh "sudo snapcraft clean --use-lxd" @@ -109,7 +110,7 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/" REV="" - if ( !JOB_NAME.contains('merge') ) { + if ( ! isMergeJob ) { REV="/"+"${GERRIT_REFSPEC}".replaceAll('/','-') } channel="latest"