Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update jq image to new canonical location #2754

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -
Loading