Skip to content

Commit 972b5fb

Browse files
chore: yq_ibl fix, fix registry to docker, fix release wf
Signed-off-by: Abhinandan Purkait <[email protected]>
1 parent 5908a81 commit 972b5fb

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
9595
- name: Update the registry and the repository
9696
run: |
97-
nix-shell --pure --run "./scripts/update-reg-repo.sh --registry docker.io/ --namespace ${{ env.IMAGE_ORG }}/zfs-driver" ./shell.nix
97+
nix-shell --pure --run "./scripts/update-reg-repo.sh --registry docker.io/ --repository ${{ env.IMAGE_ORG }}/zfs-driver" ./shell.nix
9898
9999
- name: Publish chart via helm-gh-pages
100100
uses: stefanprodan/helm-gh-pages@master

deploy/helm/charts/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ zfsPlugin:
142142
image:
143143
# Make sure that registry name end with a '/'.
144144
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
145-
registry:
145+
registry: docker.io/
146146
repository: openebs/zfs-driver
147147
pullPolicy: IfNotPresent
148148
# Overrides the image tag whose default is the chart appVersion.

scripts/update-reg-repo.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ while [ "$#" -gt 0 ]; do
3737
;;
3838
--repository)
3939
shift
40-
NEW_NAMESPACE=$1
40+
NEW_REPOSITORY=$1
4141
shift
4242
;;
4343
*)
@@ -51,9 +51,9 @@ if [ -z "${NEW_REGISTRY:-}" ]; then
5151
log_fatal "Missing required flag: --registry"
5252
fi
5353

54-
if [ -z "${NEW_NAMESPACE:-}" ]; then
54+
if [ -z "${NEW_REPOSITORY:-}" ]; then
5555
log_fatal "Missing required flag: --repository"
5656
fi
5757

5858
yq_ibl ".zfsPlugin.image.registry = \"$NEW_REGISTRY\"" "$VALUES_YAML"
59-
yq_ibl ".zfsPlugin.image.repository = \"$NEW_NAMESPACE\"" "$VALUES_YAML"
59+
yq_ibl ".zfsPlugin.image.repository = \"$NEW_REPOSITORY\"" "$VALUES_YAML"

scripts/yq_utils.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
# this function gets around that using diff with --ignore-blank-lines
33
yq_ibl()
44
{
5-
set +e
6-
diff_out=$(diff -B <(yq '.' "$2") <(yq "$1" "$2")) || error=$?
5+
error=0
6+
diff_out=$(diff -B <(cat "$2") <(yq "$1" "$2")) || error=$?
77
if [ "$error" != "0" ] && [ "$error" != "1" ]; then
88
exit "$error"
99
fi
1010
if [ -n "$diff_out" ]; then
1111
echo "$diff_out" | patch --quiet --no-backup-if-mismatch "$2" -
1212
fi
13-
set -euo pipefail
1413
}

0 commit comments

Comments
 (0)