diff options
author | Mauro Sardara <msardara@cisco.com> | 2023-01-12 08:48:47 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2023-01-12 14:16:41 +0000 |
commit | 7cb306f748cb59bba53c1b07619383010e498648 (patch) | |
tree | e4621bb806093b084b359ae313b240a515cdfed6 | |
parent | 8adfb21bf73bdb4c77d04a9c8005bd9008dd52ca (diff) |
feat: set STREAM parameters in functional testsv23.02-rc0
Ticket: HICN-822
Change-Id: I0b05a3d4b01fe2ab35682eb7d70fa0f0bdf05176
Signed-off-by: Mauro Sardara <msardara@cisco.com>
-rw-r--r-- | scripts/functions.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/functions.sh b/scripts/functions.sh index 9ff252416..66235cf5f 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -86,14 +86,17 @@ function setup_extras() { function download_artifacts() { if [[ -n ${GERRIT_HOST:-} ]] && [[ -n ${GERRIT_CHANGE_NUMBER:-} ]] && - [[ -n ${GERRIT_PATCHSET_NUMBER:-} ]]; then + [[ -n ${GERRIT_PATCHSET_NUMBER:-} ]] && + [[ -n ${GERRIT_BRANCH:-} ]]; then + + PC_STREAM="${GERRIT_BRANCH#'stable/'}" # Retrieve the Jenkins URL of the build relative to this PATCHSET JENKINS_URLS=$( curl -s "https://${GERRIT_HOST}/r/changes/${GERRIT_CHANGE_NUMBER}/detail" | tail -n +2 | jq '.messages[].message?' | - grep -E "Patch Set ${GERRIT_PATCHSET_NUMBER}:.*hicn-verify-build.*build_success-hicn-ubuntu2004-$(uname -m)" | - grep -Eo "https?://jenkins.fd.io/job/hicn-verify-build-hicn-ubuntu2004-$(uname -m)[^ ]+" + grep -E "Patch Set ${GERRIT_PATCHSET_NUMBER}:.*hicn-verify-build.*build_success-${PC_STREAM}-ubuntu2004-$(uname -m)" | + grep -Eo "https?://jenkins.fd.io/job/hicn-verify-build-${PC_STREAM}-ubuntu2004-$(uname -m)[^ ]+" ) # Transform string to array and get last |