Skip to content

Commit

Permalink
update jq image to new canonical location (#2754) (#2807)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
  • Loading branch information
HudsonHumphries and Aneurysm9 authored Aug 23, 2024
1 parent e943516 commit 75827dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tools/ssm/ssm_rollback_default_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
}

Expand Down
4 changes: 2 additions & 2 deletions tools/workflow/docker-version-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion tools/workflow/is-commit-benchmarked.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -

0 comments on commit 75827dd

Please sign in to comment.