diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 24834c8..de42631 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -62,14 +62,14 @@ steps: args: - '-c' - | - _WH_URL=$(gcloud secrets versions access latest \ + WH_URL=$$(gcloud secrets versions access latest \ --secret=webhook-url \ --project=${PROJECT_ID} 2>/dev/null || echo "") - if [[ -n "$_WH_URL" ]]; then - _NOTIFY_MSG="✅ *OSVauco Deploy fullført*\nCommit: \`$COMMIT_SHA\`\nService: \`${_CLOUD_RUN_SERVICE}\`\nRegion: \`${_REGION}\`" - curl -s -X POST "$_WH_URL" \ + if [[ -n "$$WH_URL" ]]; then + NOTIFY_MSG="✅ *OSVauco Deploy fullført*\nCommit: \`$COMMIT_SHA\`\nService: \`${_CLOUD_RUN_SERVICE}\`\nRegion: \`${_REGION}\`" + curl -s -X POST "$$WH_URL" \ -H 'Content-Type: application/json' \ - -d "{\"text\": \"$_NOTIFY_MSG\"}" || true + -d "{\"text\": \"$$NOTIFY_MSG\"}" || true echo "✓ Deploy-notifikasjon sendt" else echo "⚠️ Ingen webhook-url i Secret Manager — hopper over varsling"