-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add -eou pipefail to remaining job templates #6738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -445,6 +445,8 @@ objects: | |
- -c | ||
- | | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
function queue() { | ||
local TARGET="${1}" | ||
shift | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,8 +338,9 @@ objects: | |
- /bin/sh | ||
- -c | ||
- | | ||
#!/bin/sh | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT | ||
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
||
|
@@ -1855,6 +1856,7 @@ objects: | |
- -c | ||
- | | ||
#!/bin/bash | ||
set -euo pipefail | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe not fail here... as teardown can have failures but should attempt to try to completion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the teardown script has the following protections that make this ok i think:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jstuever agree? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hold on. teardown shouldn't need to set +e. We have a "correct" teardown on most things - if we have a non standard teardown it would only apply in that context of one job (i.e. don't go adding set +e to teardown that don't have it already) |
||
|
||
function queue() { | ||
local TARGET="${1}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to move to Bash shebangs for
pipefail
? I don't know if it's POSIXThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make the header of the files consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/openshift/release/pull/6718/files didn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(didn't move to /bin/bash i mean)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No pipefail in POSIX. I think we should move to
#!/bin/bash
.