From 59cb208ade145e17a557b409c8c3f305b2acbf5a Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Tue, 25 Jun 2024 12:37:54 -0400 Subject: [PATCH] update `jq` image to new canonical location (#2754) Signed-off-by: Anthony J Mirabella --- .github/workflows/rollback.yml | 2 +- tools/ssm/ssm_rollback_default_version.sh | 4 ++-- tools/workflow/docker-version-compare.sh | 4 ++-- tools/workflow/is-commit-benchmarked.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rollback.yml b/.github/workflows/rollback.yml index d3e7a8588c..1e2b24b3a6 100644 --- a/.github/workflows/rollback.yml +++ b/.github/workflows/rollback.yml @@ -165,7 +165,7 @@ jobs: mkdir -p ${{ env.SSM_ARTIFACT_ROOT }} for region in ${{ matrix.regions }}; do document_versions=$(aws ssm list-document-versions --name ${SSM_RELEASE_PACKAGE_NAME} --region ${region}) - document_version=$(echo $document_versions | docker run --rm -i stedolan/jq -c -r ".DocumentVersions|.[]|select(.VersionName==\"${{ github.event.inputs.rollback-version }}\")|.DocumentVersion") + document_version=$(echo $document_versions | docker run --rm -i ghcr.io/jqlang/jq -c -r ".DocumentVersions|.[]|select(.VersionName==\"${{ github.event.inputs.rollback-version }}\")|.DocumentVersion") if [[ -z $document_version ]]; then echo "Document version not found for ${{ github.event.inputs.rollback-version }} in ${region}" exit 1; diff --git a/tools/ssm/ssm_rollback_default_version.sh b/tools/ssm/ssm_rollback_default_version.sh index f8f01afbe5..d8f9326672 100644 --- a/tools/ssm/ssm_rollback_default_version.sh +++ b/tools/ssm/ssm_rollback_default_version.sh @@ -45,7 +45,7 @@ function parse_environment_input() { } function rollback_second_largest_target_document_as_default() { - document_version_names=$(aws ssm list-document-versions --name "${ssm_package_name}" --output json | docker run --rm -i stedolan/jq -c -r ".DocumentVersions|.[]|.VersionName" | sed 's/"//g' | sort -V -r) + document_version_names=$(aws ssm list-document-versions --name "${ssm_package_name}" --output json | docker run --rm -i ghcr.io/jqlang/jq -c -r ".DocumentVersions|.[]|.VersionName" | sed 's/"//g' | sort -V -r) # Convert document versions name to array # shellcheck disable=SC2206 @@ -66,7 +66,7 @@ function rollback_second_largest_target_document_as_default() { echo "Roll-back the default SSM version to ${rollback_version_name}" - rollback_document_version=$(aws ssm describe-document --name "${ssm_package_name}" --version-name "${rollback_version_name}" --output json | docker run --rm -i stedolan/jq -c -r ".Document|.DocumentVersion") + rollback_document_version=$(aws ssm describe-document --name "${ssm_package_name}" --version-name "${rollback_version_name}" --output json | docker run --rm -i ghcr.io/jqlang/jq -c -r ".Document|.DocumentVersion") aws ssm update-document-default-version --name "${ssm_package_name}" --document-version "${rollback_document_version}" } diff --git a/tools/workflow/docker-version-compare.sh b/tools/workflow/docker-version-compare.sh index a1b28f3ff2..aa095f8086 100644 --- a/tools/workflow/docker-version-compare.sh +++ b/tools/workflow/docker-version-compare.sh @@ -49,9 +49,9 @@ if [ -z "${REPO_NAME}" ]; then REPO_NAME="amazon/aws-otel-collector" fi -TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${REPO_NAME}:pull" | docker run --rm -i stedolan/jq -c ".token" | sed 's/"//g') +TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${REPO_NAME}:pull" | docker run --rm -i ghcr.io/jqlang/jq -c ".token" | sed 's/"//g') # retrieves all the available tags and sorts them in reverse version order -TAGS=$(curl -s "https://registry.hub.docker.com/v2/${REPO_NAME}/tags/list" -H "Authorization: Bearer ${TOKEN}" | docker run --rm -i stedolan/jq -c ".tags[]" | sed 's/"//g' | sort -V -r) +TAGS=$(curl -s "https://registry.hub.docker.com/v2/${REPO_NAME}/tags/list" -H "Authorization: Bearer ${TOKEN}" | docker run --rm -i ghcr.io/jqlang/jq -c ".tags[]" | sed 's/"//g' | sort -V -r) # get the first tag in the reversed list LATEST_VERSION=$(echo "${TAGS}" | sed -n '1p') diff --git a/tools/workflow/is-commit-benchmarked.sh b/tools/workflow/is-commit-benchmarked.sh index f2367bb9c0..2d02883228 100644 --- a/tools/workflow/is-commit-benchmarked.sh +++ b/tools/workflow/is-commit-benchmarked.sh @@ -28,7 +28,7 @@ HAS_COMMIT=false git switch "${GH_PAGES_BRANCH}" if [ -f benchmark/trend/data.js ]; then - HAS_COMMIT=$(sed "s/window.BENCHMARK_DATA = //" benchmark/trend/data.js | docker run --rm -i stedolan/jq -c ".entries.Benchmark | any(.commit.id == \"${COMMIT_SHA}\")") + HAS_COMMIT=$(sed "s/window.BENCHMARK_DATA = //" benchmark/trend/data.js | docker run --rm -i ghcr.io/jqlang/jq -c ".entries.Benchmark | any(.commit.id == \"${COMMIT_SHA}\")") fi echo "has-commit=${HAS_COMMIT}" >> "$GITHUB_OUTPUT" git checkout -