fix: escape bash variables in notify step (35784VAR)
This commit is contained in:
parent
b79be272c2
commit
cda1ef9157
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user