Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ed506e7d
Commit
ed506e7d
authored
Oct 07, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require username parameter in scripts/slack
parent
358299a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
.gitlab/ci/notify.gitlab-ci.yml
.gitlab/ci/notify.gitlab-ci.yml
+1
-1
scripts/slack
scripts/slack
+3
-3
No files found.
.gitlab/ci/notify.gitlab-ci.yml
View file @
ed506e7d
...
...
@@ -21,7 +21,7 @@ notify-update-gitaly:
script
:
-
echo "NOTIFY_CHANNEL is ${NOTIFY_CHANNEL}"
-
echo "CI_PIPELINE_URL is ${CI_PIPELINE_URL}"
-
scripts/slack ${NOTIFY_CHANNEL} "☠️ \`${GITALY_UPDATE_BRANCH}\` failed! ☠️ See ${CI_PIPELINE_URL} (triggered from ${MERGE_REQUEST_URL})" ci_failing
-
scripts/slack ${NOTIFY_CHANNEL} "☠️ \`${GITALY_UPDATE_BRANCH}\` failed! ☠️ See ${CI_PIPELINE_URL} (triggered from ${MERGE_REQUEST_URL})" ci_failing
"GitLab QA Bot"
notify-security-pipeline
:
extends
:
...
...
scripts/slack
View file @
ed506e7d
...
...
@@ -7,10 +7,10 @@
CHANNEL
=
$1
MSG
=
$2
ICON_EMOJI
=
$3
USERNAME
=
$
{
4
:-
"GitLab QA Bot"
}
USERNAME
=
$
4
if
[
-z
"
$CHANNEL
"
]
||
[
-z
"
$CI_SLACK_WEBHOOK_URL
"
]
||
[
-z
"
$MSG
"
]
||
[
-z
"
$ICON_EMOJI
"
]
;
then
echo
"Missing argument(s) - Use:
$0
channel message icon_emoji
[username]
"
if
[
-z
"
$CHANNEL
"
]
||
[
-z
"
$CI_SLACK_WEBHOOK_URL
"
]
||
[
-z
"
$MSG
"
]
||
[
-z
"
$ICON_EMOJI
"
]
||
[
-z
"
$USERNAME
"
]
;
then
echo
"Missing argument(s) - Use:
$0
channel message icon_emoji
username
"
echo
"and set CI_SLACK_WEBHOOK_URL environment variable."
else
curl
-X
POST
--data-urlencode
'payload={"channel": "#'
"
$CHANNEL
"
'", "username": "'
"
$USERNAME
"
'", "text": "'
"
$MSG
"
'", "icon_emoji": "'
":
$ICON_EMOJI
:"
'"}'
"
$CI_SLACK_WEBHOOK_URL
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment