Skip to content

Commit

Permalink
Bug 1917740 - Improve reference script update for Snap QA tests r=ben…
Browse files Browse the repository at this point in the history
…chatt

Differential Revision: https://phabricator.services.mozilla.com/D223271
  • Loading branch information
Alexandre Lissy committed Sep 25, 2024
1 parent 274db45 commit 09c8795
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion taskcluster/docker/snap-coreXX-build/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ else
# index.gecko.v2.mozilla-central.revision.bf0897ec442e625c185407cc615a6adc0e40fa75.firefox.amd64-nightly
# => https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.revision.bf0897ec442e625c185407cc615a6adc0e40fa75.firefox.amd64-nightly/artifacts/public%2Fbuild%2Ffirefox.snap

INDEX_NAME="${BRANCH}"
# Remove "-" so we get e.g., esr128 from esr-128
INDEX_NAME=${BRANCH//-/}
if [ "${INDEX_NAME}" = "try" ]; then
INDEX_NAME=nightly
fi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

TASK_ID=${1}
THIS="$(dirname "$0")"
THERE=${2}

if [ -z "${TASK_ID}" ]; then
echo "Please provide a task ID"
Expand All @@ -16,6 +17,10 @@ do
name="$(basename "${reference}")"
final_name=${name//new_/}
target_name=$(find "${THIS}" -type f -name "${final_name}")
if [ -n "${THERE}" ]; then
# shellcheck disable=SC2001
target_name=$(echo "${target_name}" | sed -e "s/\.png$/-${THERE}.png/g")
fi
url="${TASKCLUSTER_API_ROOT}/api/queue/v1/task/${TASK_ID}/artifacts/${reference}"
echo "$url => $target_name"
curl -SL "${url}" -o "${target_name}"
Expand Down

0 comments on commit 09c8795

Please sign in to comment.