Skip to content

Commit

Permalink
send an email to verify successful deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Mar 5, 2024
1 parent faf5c8d commit 01a7c11
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion infrastructure/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,17 @@ while true; do
break
fi
sleep 5
done
done

# Send a notification email to confirm emails are working
EMAIL_PAYLOAD='{
"subject": "Deployment to '$ENV' finished",
"html": "Deployment to '$ENV' was successful with images '$VERSION' for core and '$COUNTRY_CONFIG_VERSION' for country config.",
"from": "{{SENDER_EMAIL_ADDRESS}}",
"to": "{{ALERT_EMAIL}}"
}'

configured_ssh "docker run --rm --network=opencrvs_overlay_net appropriate/curl \
-X POST 'http://countryconfig:3040/email' \
-H 'Content-Type: application/json' \
-d '$EMAIL_PAYLOAD'"

0 comments on commit 01a7c11

Please sign in to comment.