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
7d981a94
Commit
7d981a94
authored
Sep 16, 2020
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix script to fail pipeline early
- Check for "null" value in `get_job_id`
parent
961005be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
scripts/utils.sh
scripts/utils.sh
+2
-2
No files found.
scripts/utils.sh
View file @
7d981a94
...
...
@@ -110,7 +110,7 @@ function get_job_id() {
let
"page++"
done
if
[[
"
${
job_id
}
"
==
"
"
]]
;
then
if
[[
"
${
job_id
}
"
==
"
null"
]]
;
then
# jq prints "null" for non-existent attribute
echoerr
"The '
${
job_name
}
' job ID couldn't be retrieved!"
else
echoinfo
"The '
${
job_name
}
' job ID is
${
job_id
}
"
...
...
@@ -142,7 +142,7 @@ function fail_pipeline_early() {
local
dont_interrupt_me_job_id
dont_interrupt_me_job_id
=
$(
get_job_id
'dont-interrupt-me'
'scope=success'
)
if
[[
"
${
dont_interrupt_me_job_id
}
"
!=
"
"
]]
;
then
if
[[
-n
"
${
dont_interrupt_me_job_id
}
"
]]
;
then
echoinfo
"This pipeline cannot be interrupted due to
\`
dont-interrupt-me
\`
job
${
dont_interrupt_me_job_id
}
"
else
echoinfo
"Failing pipeline early for fast feedback due to test failures in rspec fail-fast."
...
...
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