fix: use _WH_URL with underscore prefix - valid Cloud Build substitution key

This commit is contained in:
Chris Christiansen 2026-05-24 02:11:15 +00:00
parent aa76e9ab4c
commit 032cf19f24

View File

@ -62,12 +62,12 @@ steps:
args: args:
- '-c' - '-c'
- | - |
WH_URL=$(gcloud secrets versions access latest \ _WH_URL=$(gcloud secrets versions access latest \
--secret=webhook-url \ --secret=webhook-url \
--project=${PROJECT_ID} 2>/dev/null || echo "") --project=${PROJECT_ID} 2>/dev/null || echo "")
if [[ -n "$WH_URL" ]]; then if [[ -n "$_WH_URL" ]]; then
MSG="✅ *OSVauco Deploy fullført*\nCommit: \`$COMMIT_SHA\`\nService: \`${_CLOUD_RUN_SERVICE}\`\nRegion: \`${_REGION}\`" MSG="✅ *OSVauco Deploy fullført*\nCommit: \`$COMMIT_SHA\`\nService: \`${_CLOUD_RUN_SERVICE}\`\nRegion: \`${_REGION}\`"
curl -s -X POST "$WH_URL" \ curl -s -X POST "$_WH_URL" \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
-d "{\"text\": \"$MSG\"}" || true -d "{\"text\": \"$MSG\"}" || true
echo "✓ Deploy-notifikasjon sendt" echo "✓ Deploy-notifikasjon sendt"