Skip to content

Commit

Permalink
add -eou pipefail to remaining job templates
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Jan 16, 2020
1 parent 63b7dc8 commit bee15b9
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ objects:
- /bin/bash
- -c
- |
#!/bin/bash -x
#!/bin/bash
set -euo pipefail
# fetch the oc binary so we can talk to the cluster.
export PATH=$PATH:/tmp/shared/bin
Expand Down Expand Up @@ -153,7 +154,8 @@ objects:
- /bin/bash
- -c
- |
#!/bin/bash -x
#!/bin/bash
set -euo pipefail
export PATH=$PATH:/tmp/shared/bin
Expand Down Expand Up @@ -377,7 +379,8 @@ objects:
- /bin/sh
- -c
- |
#!/bin/sh -x
#!/bin/bash
set -euo pipefail
export PATH=$PATH:/tmp/shared/bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ objects:
- /bin/bash
- -c
- |
#!/bin/sh
set -e
#!/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
Expand Down Expand Up @@ -660,6 +660,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ objects:
- /bin/bash
- -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
Expand Down Expand Up @@ -731,6 +731,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ objects:
- /bin/sh
- -c
- |
#!/bin/sh
#!/bin/bash
set -euo pipefail
trap 'rc=$?; if test "${rc}" -eq 0; then touch "${HOME}"/setup-success; else touch "${HOME}"/exit; fi; exit "${rc}"' EXIT
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
cat > "${HOME}"/run-tests.sh << 'EOF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ objects:
- /bin/sh
- -c
- |
#!/bin/sh
set -ex
#!/bin/bash
set -euo pipefail
set -x
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
Expand Down Expand Up @@ -515,6 +517,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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; fi; exit "${rc}"' EXIT
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
# Wait untill lease is acquired
Expand Down Expand Up @@ -449,6 +451,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ objects:
- /bin/bash
- -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
Expand Down Expand Up @@ -566,6 +566,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1855,6 +1856,7 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ objects:
- /bin/sh
- -c
- |
#!/bin/sh
set -e
#!/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
Expand Down Expand Up @@ -1073,6 +1074,7 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function teardown() {
set +e
touch /tmp/shared/exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function teardown() {
set +e
touch /tmp/shared/exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function teardown() {
set +e
touch /tmp/shared/exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function teardown() {
set +e
touch /tmp/shared/exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function teardown() {
set +e
touch /tmp/shared/exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,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
cp "$(command -v openshift-install)" /tmp
Expand Down Expand Up @@ -362,6 +364,8 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
function queue() {
local TARGET="${1}"
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ objects:
- -c
- |
#!/bin/bash
# error handling and sync code
set -euo pipefail
trap 'touch /tmp/shared/exit' EXIT
Expand Down Expand Up @@ -271,7 +270,7 @@ objects:
- /bin/bash
- -c
- |
#!/bin/bash
#!/bin/bash
set -euo pipefail
trap 'rc=$?; if [[ $rc -ne 0 ]]; then
Expand Down Expand Up @@ -361,6 +360,7 @@ objects:
- -c
- |
#!/bin/bash
set -euo pipefail
# teardown is collecting debug data and deleting all used resources
function teardown() {
Expand Down

0 comments on commit bee15b9

Please sign in to comment.