fix: unquote shell vars in cloudbuild.yaml to avoid Cloud Build substitution parse error

This commit is contained in:
Chris Christiansen 2026-05-24 02:02:36 +00:00
parent 25eec703ce
commit d84ea0d5c3

View File

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