Skip to content

Commit

Permalink
chore(buildkite): mention user in private channel (#8071)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexledesma committed May 25, 2022
1 parent b6caeaf commit 220e74d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .buildkite/dagster-buildkite/dagster_buildkite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
import yaml
from typing_extensions import Literal, TypeAlias, TypedDict

BUILD_CREATOR_EMAIL_TO_SLACK_CHANNEL_MAP = {
"rex@elementl.com": "eng-buildkite-rex",
"dish@elementl.com": "eng-buildkite-dish",
}

# ########################
# ##### BUILDKITE STEP DATA STRUCTURES
# ########################
Expand Down Expand Up @@ -74,6 +79,13 @@ def buildkite_yaml_for_steps(steps) -> str:
"CI_PULL_REQUEST": "$BUILDKITE_PULL_REQUEST",
},
"steps": steps,
"notify": [
{
"slack": f"elementl#{slack_channel}",
"if": f"build.creator.email == '{buildkite_email}'",
}
for buildkite_email, slack_channel in BUILD_CREATOR_EMAIL_TO_SLACK_CHANNEL_MAP.items()
],
},
default_flow_style=False,
)
Expand Down

0 comments on commit 220e74d

Please sign in to comment.