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

Fix our use of yq #1537

Closed
wants to merge 1 commit into from
Closed
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/dockerhub-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
env:
SKOPEO_AUTH_DIR: ${{env.SKOPEO_AUTH_DIR}}
run: |
IMAGES=$(cat .github/promote-images.yml | yq '."europe-docker.pkg.dev/gitpod-artifacts/docker-dev"."images-by-tag-regex"|keys[]' -r)
IMAGES=$(cat .github/promote-images.yml | yq '."europe-docker.pkg.dev/gitpod-artifacts/docker-dev"."images-by-tag-regex"|keys[]')
for IMAGE in $IMAGES;
do
sudo -E skopeo copy --format=oci --dest-oci-accept-uncompressed-layers --retry-times=5 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
run: |
set -euo pipefail

IFS=$'\n' read -r -d '' -a IMAGE_TAGS_ARR < <(yq -r '.sync.images."workspace-base-images"[]' ./.github/sync-containers.yml && printf '\0')
IFS=$'\n' read -r -d '' -a IMAGE_TAGS_ARR < <(yq '.sync.images."workspace-base-images"[]' ./.github/sync-containers.yml && printf '\0')
UPLOADS_STRING=""
for IMAGE_TAG in "${IMAGE_TAGS_ARR[@]}"; do
UPLOADS_STRING+=$(printf "./.github/workflows/push-main/upload_image.sh %s%s" ${IMAGE_TAG}'\n')
Expand Down
2 changes: 1 addition & 1 deletion build-chunk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function extract_variants() {
if [[ ! -f "chunks/${chunk_name}/chunk.yaml" ]]; then
variants+=("${chunk_name}")
else
for variant in $(yq '.variants[].name' -r <"chunks/${chunk_name}/chunk.yaml"); do
for variant in $(yq '.variants[].name' "chunks/${chunk_name}/chunk.yaml"); do
variants+=("${chunk_name}:${variant}")
done
fi
Expand Down
6 changes: 3 additions & 3 deletions build-combo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function build_combination() {
combination=$1

local exists
exists="$(yq e '.combiner.combinations[] | select (.name=="'"$combination"'")' dazzle.yaml)"
exists="$(yq '.combiner.combinations[] | select (.name=="'"$combination"'")' dazzle.yaml)"
if [[ -z "$exists" ]]; then
echo "combination is not defined"
exit 1
Expand All @@ -30,7 +30,7 @@ function get_refs() {
local ref=$1
echo "$ref"

refs="$(yq e '.combiner.combinations[] | select (.name=="'"$ref"'") | .ref[]' dazzle.yaml)"
refs="$(yq '.combiner.combinations[] | select (.name=="'"$ref"'") | .ref[]' dazzle.yaml)"
if [[ -z "$refs" ]]; then
return
fi
Expand All @@ -43,7 +43,7 @@ function get_refs() {
function get_chunks() {
# shellcheck disable=SC2068
for ref in $@; do
chunks=$(yq e '.combiner.combinations[] | select (.name=="'"$ref"'") | .chunks[]' dazzle.yaml)
chunks=$(yq '.combiner.combinations[] | select (.name=="'"$ref"'") | .chunks[]' dazzle.yaml)
echo "$chunks"
done
}
Expand Down
2 changes: 1 addition & 1 deletion build-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function get_available_chunks() {
for chunk in $chunk_defs; do
local chunkYaml="chunks/${chunk}/chunk.yaml"
if [[ -f "$chunkYaml" ]]; then
variants=$(yq e '.variants[].name' "$chunkYaml")
variants=$(yq '.variants[].name' "$chunkYaml")
for variant in $variants; do
echo "$chunk:$variant"
done
Expand Down
Loading