Skip to content

Commit

Permalink
add step to update kusomization
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Feb 8, 2024
1 parent 3720d1f commit 0b0d1e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hack/scripts/render-sec-scanners-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TAG=$1
OUTPUT_FILE=${2:-"sec-scanners-config.yaml"}
WEBHOOK_FILE=${3-"config/webhook/kustomization.yaml"}
PUBLISHER_FILE=${4-"config/manager/manager.yaml"}

KUSTOMIZATION_FILE=${5-"config/manager/kustomization.yaml"}
# Fetch Webhook Image.
echo "fetching webhook image from ${WEBHOOK_FILE}"
WEBHOOK_IMAGE=$(yq eval '.images[0].newName' <"$WEBHOOK_FILE")
Expand Down Expand Up @@ -41,3 +41,7 @@ whitesource:
- "**/*_test.go"
- "/hack/**"
EOF

# Bump kustomization file
sed -i "/images.newTag/c\images.newTag: ${VERSION}" "${KUSTOMIZATION_FILE}"
awk -v ntv="$VERSION" '/newTag:/ {print $1 ":" " " ntv} !/newTag:/' "$KUSTOMIZATION_FILE" >tmp_file && mv tmp_file "$KUSTOMIZATION_FILE"

0 comments on commit 0b0d1e1

Please sign in to comment.