Skip to content

Commit

Permalink
Configure the notify make target to use Grafana's Slack configuration…
Browse files Browse the repository at this point in the history
… in order to post to the new govtool-notifications channel. This change is introduced due to migration of Slack app to a different organization and use of a single Slack App instead of separate ones.
  • Loading branch information
adgud authored and placek committed Feb 22, 2024
1 parent af8c99a commit 44c6fa2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ jobs:
curl -X POST -u "admin:$GRAFANA_ADMIN_PASSWORD" https://$DOMAIN/grafana/api/admin/provisioning/dashboards/reload
curl -X POST -u "admin:$GRAFANA_ADMIN_PASSWORD" https://$DOMAIN/grafana/api/admin/provisioning/notifications/reload
- name: Notify on Slack
env:
SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_NOTIFY_SLACK_WEBHOOK_URL }}
run: |
if [[ "${{ inputs.environment }}" == "staging" ]]; then export DOMAIN=staging.govtool.byron.network; fi;
if [[ "${{ inputs.environment }}" == "beta" ]]; then export DOMAIN=sanchogov.tools; fi;
Expand Down
2 changes: 1 addition & 1 deletion scripts/govtool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ info:
notify:
@:$(call check_defined, cardano_network)
@:$(call check_defined, env)
curl -X POST -H 'Content-type: application/json' --data '{"host":"$(docker_host)","branch":"$(branch)","env":"$(env)","commit":"$(shell git rev-parse HEAD)"}' $$SLACK_WEBHOOK_URL
curl -X POST -H "Authorization: Bearer $$GRAFANA_SLACK_OAUTH_TOKEN" -d "channel=$$GRAFANA_SLACK_RECIPIENT" -d "text=The deploy to $(env) has been made from branch $(branch) ($(shell git-rev-parse HEAD))" https://slack.com/api/chat.postMessage

.PHONY: ssh
ssh:
Expand Down

0 comments on commit 44c6fa2

Please sign in to comment.