@@ -80,10 +80,13 @@ function getAuthorFields {
80
80
}
81
81
82
82
author=" "
83
- text=" *Project: ` $CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME ` Branch: ` $CIRCLE_BRANCH ` *"
83
+ text=" *Project: \ `$CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME \ ` Branch: \ `$CIRCLE_BRANCH \ ` *"
84
84
fields=" "
85
85
actions=" "
86
86
87
+ echo " BUILD_STATUS='$BUILD_STATUS '"
88
+ echo " DEPLOY_STATUS='$DEPLOY_STATUS '"
89
+
87
90
if [[ " $BUILD_STATUS " == " success" ]]
88
91
then
89
92
if [[ " $DEPLOY_STATUS " == " success" ]]
@@ -101,34 +104,36 @@ then
101
104
}
102
105
"
103
106
if [[ " $DEPLOY_TAG_MELLIS " ]]; then
104
- mellisTagText=" (tag: <https://github.com/$CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME /releases/tag/$DEPLOY_TAG_MELLIS |$DEPLOY_TAG_MELLIS >)"
107
+ mellisTagText=" _ (tag: <https://github.com/$CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME /releases/tag/$DEPLOY_TAG_MELLIS |$DEPLOY_TAG_MELLIS >)_ "
105
108
else
106
- mellisTagText=" (no new tag)"
109
+ mellisTagText=" _ (no new tag)_ "
107
110
fi
108
111
if [[ " $DEPLOY_TAG_PYTHON3 " ]]; then
109
- python3TagText=" (tag: <https://github.com/$CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME /releases/tag/$DEPLOY_TAG_PYTHON3 |$DEPLOY_TAG_PYTHON3 >)"
112
+ python3TagText=" _ (tag: <https://github.com/$CIRCLE_PROJECT_USERNAME /$CIRCLE_PROJECT_REPONAME /releases/tag/$DEPLOY_TAG_PYTHON3 |$DEPLOY_TAG_PYTHON3 >)_ "
110
113
else
111
- python3TagText=" (no new tag)"
114
+ python3TagText=" _ (no new tag)_ "
112
115
fi
113
116
fields=" {
114
117
\" title\" : \" Mellis\" ,
115
- \" value\" : \" ` ` ` $MELLIS_VERSION ` ` ` \\ n$mellisTagText \" ,
118
+ \" value\" : \"\`\`\ ` $MELLIS_VERSION \`\`\ `\\ n$mellisTagText \" ,
116
119
\" short\" : true
117
120
},
118
121
{
119
122
\" title\" : \" Python3 module\" ,
120
- \" value\" : \" ` ` ` $MELLIS_PYTHON3_VERSION ` ` ` \\ n$python3TagText \" ,
123
+ \" value\" : \"\`\`\ ` $MELLIS_PYTHON3_VERSION \`\`\ `\\ n$python3TagText \" ,
121
124
\" short\" : true
122
125
}"
123
- elif [[ " $DEPLOY_STATUS " == " idle " ]]
124
- then
126
+ else
127
+ echo " Nothing to deploy 'eh? "
125
128
# Nothing to deploy
126
- color=" #3AA3E3" # blue
129
+ # color="#3AA3E3" # blue
130
+ color=" " # slack defaults to gray
127
131
visitJobActionStyle=" default" # gray
128
132
title=" NOTHING TO DEPLOY"
129
133
text=" $text \\ n_No new tags_"
130
134
fi
131
135
else
136
+ # Build failed
132
137
color=" #ed5c5c" # red
133
138
visitJobActionStyle=" danger" # red
134
139
title=" :no_entry_sign: DEPLOYMENT JOB FAILED"
168
173
echo " Job completed successfully. Alert sent."
169
174
else
170
175
echo " Something went wrong in the webhook..."
171
- echo " Payload:"
172
- echo
173
- echo " $data "
174
176
fi
177
+
178
+ echo " Payload:"
179
+ echo
180
+ echo " $data "
0 commit comments