Commit 36133169 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

Merge pull request #1966 from mslipper/feat/ci-slack-notif

ci: Add Slack notifications to nightly deployment
parents 0a20266f 76e2b01b
version: 2.1
orbs:
gcp-gke: circleci/gcp-gke@1.3.0
slack: circleci/slack@4.5.1
slack-fail-post-step: &slack-fail-post-step
post-steps:
- slack/notify:
channel: $SLACK_DEFAULT_CHANNEL
event: fail
custom: |
{
"text": "",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🔴 Nightly build failed!"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
commands:
build-dockerfile:
parameters:
......@@ -109,6 +141,14 @@ jobs:
kubectl rollout restart statefulset nightly-dtl --namespace nightly
kubectl rollout restart deployment nightly-gas-oracle --namespace nightly
kubectl rollout restart deployment edge-proxyd --namespace nightly
notify:
docker:
- image: cimg/base:2021.04
steps:
- run:
name: Success
command: |
echo "Dummy job."
workflows:
......@@ -122,23 +162,45 @@ workflows:
- develop
jobs:
- build-dtl:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-batch-submitter:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-deployer:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-l2geth:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-gas-oracle:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-integration-tests:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- build-go-batch-submitter:
context: optimism
- build-proxyd:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
- deploy-nightly:
context: optimism
context:
- optimism
- slack
<<: *slack-fail-post-step
requires:
- build-dtl
- build-batch-submitter
......@@ -147,4 +209,37 @@ workflows:
- build-l2geth
- build-gas-oracle
- build-integration-tests
- build-proxyd
\ No newline at end of file
- build-proxyd
- notify:
context: slack
requires:
- deploy-nightly
post-steps:
- slack/notify:
custom: |
{
"text": "",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "✅ Nightly successfully deployed."
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
event: always
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment