File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ [ -z " $DEBUG " ] || set -x
3+ set -eo pipefail
4+
5+ [ -z " $BUMP_INCLUDE " ] && BUMP_INCLUDE=' --include=*.yaml'
6+
7+ [ " $1 " = " help" ] && echo " adsf
8+ Adds digests to kustomize images.
9+ Usage: update newTag with the desired tags, then run the script.
10+ BUMP_INCLUDE='$BUMP_INCLUDE '
11+ " && exit 0
12+
13+ SRC=$1
14+ [ -z " $SRC " ] && echo " First arg must be a path like . or ./my/kustomization.yaml" && exit 1
15+
16+ [ -f " $SRC " ] || (echo " non-file input $SRC is currently unsupported" && exit 1)
17+ FILE=" $SRC "
18+
19+ for img in $( yq e ' .images.[] | .name + "=" + (.newName // .name) + ":" + .newTag' $FILE ) ; do
20+ name=$( echo " $img " | cut -d= -f1)
21+ ref=$( echo " $img " | cut -d= -f2 | cut -d@ -f1)
22+ tag=$( echo " $ref " | cut -d: -f2)
23+ echo " # $name -> $tag ..."
24+ y-image-bump " $name " " $tag " " $FILE "
25+ done
You can’t perform that action at this time.
0 commit comments