Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INF-210 Send pre-deploy messages #3587

Merged
merged 2 commits into from
Jul 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 43 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,45 @@ orbs:
slack: circleci/slack@4.9.3

commands:
slack-basic:
parameters:
event:
description: when this notification will fire. options are fail, pass, always.
type: string
default: always
branch_pattern:
description: branch_pattern arg for slack/notify
type: string
default: .+
channel:
description: Slack channel to send message to
type: string
default: $SLACK_DEFAULT_CHANNEL
text:
description: Markdown formatted Slack message
type: string
default: ""
steps:
- slack/notify:
channel: << parameters.channel >>
branch_pattern: << parameters.branch_pattern >>
custom: |
{
"blocks": [
{
"type": "section",
"fields": [
{
"type": "plain_text",
"text": "<< parameters.text >>",
"emoji": true
}
]
}
]
}
event: << parameters.event >>

diff-if-necessary:
parameters:
service:
Expand Down Expand Up @@ -113,47 +152,6 @@ parameters:
default: false

jobs:
slack/basic:
docker:
- image: 'cimg/base:stable'
parameters:
event:
description: when this notification will fire. options are fail, pass, always.
type: string
default: always
branch_pattern:
description: branch_pattern arg for slack/notify
type: string
default: .+
channel:
description: Slack channel to send message to
type: string
default: C03EK0C69QD
text:
description: Markdown formatted Slack message
type: string
default: ""
steps:
- slack/notify:
channel: << pipeline.parameters.channel >>
branch_pattern: << pipeline.parameters.branch_pattern >>
custom: |
{
"blocks": [
{
"type": "section",
"fields": [
{
"type": "plain_text",
"text": "<< pipeline.parameters.text >>",
"emoji": true
}
]
}
]
}
event: << pipeline.parameters.event >>

bake-gcp-dev-image:
docker:
- image: audius/circleci-gcloud-bake:latest
Expand Down Expand Up @@ -206,10 +204,10 @@ jobs:
type: string
default: ""
steps:
# - slack/basic:
# event: always
# branch_pattern: master
# text: "$CIRCLE_USERNAME is publishing SDK@<< pipeline.parameters.sdk_release_tag >>."
- slack-basic:
event: always
branch_pattern: master
text: "$CIRCLE_USERNAME is publishing SDK@<< pipeline.parameters.sdk_release_tag >>."
- checkout
- setup_remote_docker
- add_ssh_keys:
Expand Down