diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy index 049763c6ee0f99c5ce32b2e82d68b6b868350fc0..616f569f1b39af6d8725e14a85c7fc6811527df3 100644 --- a/jenkins/ci-pipelines/ci_stage_2.groovy +++ b/jenkins/ci-pipelines/ci_stage_2.groovy @@ -88,7 +88,9 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa REV="" if ( !JOB_NAME.contains('merge') ) { - REV="/"+"${GERRIT_REFSPEC}".replaceAll('/','-') + short_ref=sh(returnStdout: true, + script: "git rev-parse --short HEAD").trim() + REV="/"+short_ref } channel="latest" if (BRANCH_NAME.startsWith("v")) { diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 541213b43c8fe7d2748ea587e1a046a961499916..de2aaacd413f33cb6c93b798b0f239215ceb6fab 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -531,14 +531,14 @@ EOF""" "-w /build snapcore/snapcraft:stable /bin/bash -c " + "\"snapcraft login --with /snapcraft/config &>/dev/null && " + "snapcraft revisions $snap\" | " + - "grep \" $track\" | tail -1 | awk '{print \$1}'").trim() + "grep \"$track\" | tail -1 | awk '{print \$1}'").trim() track=channel+"beta\\*" beta_rev=sh(returnStdout: true, script: "sudo docker run -v ~/.snapcraft:/snapcraft -v ${WORKSPACE}:/build " + "-w /build snapcore/snapcraft:stable /bin/bash -c " + "\"snapcraft login --with /snapcraft/config &>/dev/null && " + "snapcraft revisions $snap\" | " + - "grep \" $track\" | tail -1 | awk '{print \$1}'").trim() + "grep \"$track\" | tail -1 | awk '{print \$1}'").trim() if ( edge_rev != beta_rev ) { print "Promoting $edge_rev to beta in place of $beta_rev"