File tree Expand file tree Collapse file tree 1 file changed +45
-2
lines changed Expand file tree Collapse file tree 1 file changed +45
-2
lines changed Original file line number Diff line number Diff line change 1- version : 2
1+ version : 2.1
2+
3+ orbs :
4+ slack : circleci/slack@4.1
5+
6+ slack/notify : &slack_notify
7+ branch_pattern : master
8+ event : fail
9+ channel : ci-build-status
10+ template : SLACK_TAG_CI_FAILURE_TEMPLATE
11+
12+ commands :
13+ export_slack_id :
14+ steps :
15+ - run :
16+ name : Exporting circleci username as slack id.
17+ command : echo 'export SLACK_PARAM_MENTIONS="$CIRCLE_USERNAME"' >> "$BASH_ENV"
18+ - run :
19+ name : CircleCi To Slack user mapping.
20+ command : |
21+ echo $GITHUB_SLACK_USERMAPPING | base64 --decode > github_slack
22+ while read -r line || [[ -n $line ]];
23+ do
24+ [[ ${line//[[:space:]]/} =~ ^#.* || -z "$line" ]] && continue
25+ echo "$line" | tr "=" "\n" | while read -r key; do
26+ read -r value
27+ if [ "$CIRCLE_USERNAME" = "${key}" ]; then
28+ echo "export SLACK_PARAM_MENTIONS='<@${value}>'" >> $BASH_ENV
29+ fi
30+ done
31+ done < github_slack
32+ rm github_slack
233
334jobs :
435 build :
1344
1445 steps :
1546 - checkout
16-
47+ - export_slack_id
1748 - restore_cache :
1849 keys :
1950 - v1-dependencies-{{ checksum "build.gradle" }}
2758 key : v1-dependencies-{{ checksum "build.gradle" }}
2859
2960 - run : ./gradlew test
61+
62+ - slack/notify :
63+ << : *slack_notify
64+
65+ workflows :
66+ sift-java :
67+ jobs :
68+ - build :
69+ context :
70+ - slack-templates
71+ - slack_Oauth
72+ - Github_Slack_UserMapping
You can’t perform that action at this time.
0 commit comments