From: Mark Beierl Date: Thu, 22 Sep 2022 14:01:14 +0000 (-0400) Subject: Fixing track X-Git-Tag: v13.0.0rc2~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c06994a8689974f35397991169d5ba8787e6507e;p=osm%2Fdevops.git Fixing track Use variable instead of hard-coded 'latest' Change-Id: I72bcf6f0ed7ef84aefde255d6ee877ead86836b6 Signed-off-by: Mark Beierl (cherry picked from commit c598418ec0c5aadfb38aac91cccf28369a34f23c) --- diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index ec116719..70f350fd 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -705,11 +705,11 @@ EOF""" sh "charmcraft status $charm --format json > ${charm}.json" isCharm = sh(returnStdout: true, script: "grep architecture ${charm}.json | wc -l").trim() as int if (isCharm) { - jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"latest/edge/merged\")| .version'|head -1" - jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"latest/beta\")| .version'|head -1" + jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .version'|head -1" + jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/beta\")| .version'|head -1" } else { - jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[].releases[] | select(.channel==\"latest/edge/merged\")| .version'|head -1" - jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[].releases[] | select(.channel==\"latest/beta\")| .version'|head -1" + jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[].releases[] | select(.channel==\"$channel/edge/merged\")| .version'|head -1" + jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[].releases[] | select(.channel==\"$channel/beta\")| .version'|head -1" } // edge/merged is used in place of /edge as 10.1.0 LTS uses latest/edge edge_rev = sh(returnStdout: true, script: jqScriptEdge).trim()