Skip to content

Commit ca65547

Browse files
committed
Revert "Revert "add -eou pipefail to remaining job templates""
This reverts commit 07bd61d.
1 parent 379854d commit ca65547

17 files changed

+55
-17
lines changed

ci-operator/templates/openshift/endurance/endurance-install.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ objects:
8080
- /bin/bash
8181
- -c
8282
- |
83-
#!/bin/bash -x
83+
#!/bin/bash
84+
set -euo pipefail
8485
8586
# fetch the oc binary so we can talk to the cluster.
8687
export PATH=$PATH:/tmp/shared/bin
@@ -153,7 +154,8 @@ objects:
153154
- /bin/bash
154155
- -c
155156
- |
156-
#!/bin/bash -x
157+
#!/bin/bash
158+
set -euo pipefail
157159
158160
export PATH=$PATH:/tmp/shared/bin
159161
@@ -377,7 +379,8 @@ objects:
377379
- /bin/sh
378380
- -c
379381
- |
380-
#!/bin/sh -x
382+
#!/bin/bash
383+
set -euo pipefail
381384
382385
export PATH=$PATH:/tmp/shared/bin
383386

ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ objects:
380380
- /bin/bash
381381
- -c
382382
- |
383-
#!/bin/sh
384-
set -e
383+
#!/bin/bash
384+
set -euo pipefail
385385
386386
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
387387
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
@@ -660,6 +660,8 @@ objects:
660660
- -c
661661
- |
662662
#!/bin/bash
663+
set -euo pipefail
664+
663665
function queue() {
664666
local TARGET="${1}"
665667
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ objects:
385385
- /bin/bash
386386
- -c
387387
- |
388-
#!/bin/sh
388+
#!/bin/bash
389389
set -euo pipefail
390390
391391
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
@@ -731,6 +731,8 @@ objects:
731731
- -c
732732
- |
733733
#!/bin/bash
734+
set -euo pipefail
735+
734736
function queue() {
735737
local TARGET="${1}"
736738
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ objects:
185185
- /bin/sh
186186
- -c
187187
- |
188-
#!/bin/sh
188+
#!/bin/bash
189189
set -euo pipefail
190+
190191
trap 'rc=$?; if test "${rc}" -eq 0; then touch "${HOME}"/setup-success; else touch "${HOME}"/exit; fi; exit "${rc}"' EXIT
191192
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
192193
cat > "${HOME}"/run-tests.sh << 'EOF'

ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ objects:
226226
- /bin/sh
227227
- -c
228228
- |
229-
#!/bin/sh
230-
set -ex
229+
#!/bin/bash
230+
set -euo pipefail
231+
set -x
232+
231233
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
232234
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
233235
@@ -515,6 +517,8 @@ objects:
515517
- -c
516518
- |
517519
#!/bin/bash
520+
set -euo pipefail
521+
518522
function queue() {
519523
local TARGET="${1}"
520524
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ objects:
445445
- -c
446446
- |
447447
#!/bin/bash
448+
set -euo pipefail
449+
448450
function queue() {
449451
local TARGET="${1}"
450452
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-ovirt-e2e.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ objects:
323323
- /bin/sh
324324
- -c
325325
- |
326-
#!/bin/sh
326+
#!/bin/bash
327+
set -euo pipefail
328+
327329
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit; fi; exit "${rc}"' EXIT
328330
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
329331
# Wait untill lease is acquired
@@ -449,6 +451,8 @@ objects:
449451
- -c
450452
- |
451453
#!/bin/bash
454+
set -euo pipefail
455+
452456
function queue() {
453457
local TARGET="${1}"
454458
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ objects:
243243
- /bin/bash
244244
- -c
245245
- |
246-
#!/bin/sh
246+
#!/bin/bash
247247
set -euo pipefail
248248
249249
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
@@ -566,6 +566,8 @@ objects:
566566
- -c
567567
- |
568568
#!/bin/bash
569+
set -euo pipefail
570+
569571
function queue() {
570572
local TARGET="${1}"
571573
shift

ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ objects:
338338
- /bin/sh
339339
- -c
340340
- |
341-
#!/bin/sh
341+
#!/bin/bash
342342
set -euo pipefail
343+
343344
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
344345
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
345346
@@ -1855,6 +1856,7 @@ objects:
18551856
- -c
18561857
- |
18571858
#!/bin/bash
1859+
set -euo pipefail
18581860
18591861
function queue() {
18601862
local TARGET="${1}"

ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ objects:
333333
- /bin/sh
334334
- -c
335335
- |
336-
#!/bin/sh
337-
set -e
336+
#!/bin/bash
337+
set -euo pipefail
338+
338339
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
339340
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
340341
@@ -1073,6 +1074,7 @@ objects:
10731074
- -c
10741075
- |
10751076
#!/bin/bash
1077+
set -euo pipefail
10761078
10771079
function queue() {
10781080
local TARGET="${1}"

ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ objects:
255255
- -c
256256
- |
257257
#!/bin/bash
258+
set -euo pipefail
259+
258260
function teardown() {
259261
set +e
260262
touch /tmp/shared/exit

ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ objects:
312312
- -c
313313
- |
314314
#!/bin/bash
315+
set -euo pipefail
316+
315317
function teardown() {
316318
set +e
317319
touch /tmp/shared/exit

ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ objects:
260260
- -c
261261
- |
262262
#!/bin/bash
263+
set -euo pipefail
264+
263265
function teardown() {
264266
set +e
265267
touch /tmp/shared/exit

ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ objects:
216216
- -c
217217
- |
218218
#!/bin/bash
219+
set -euo pipefail
220+
219221
function teardown() {
220222
set +e
221223
touch /tmp/shared/exit

ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ objects:
199199
- -c
200200
- |
201201
#!/bin/bash
202+
set -euo pipefail
203+
202204
function teardown() {
203205
set +e
204206
touch /tmp/shared/exit

ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ objects:
224224
- /bin/sh
225225
- -c
226226
- |
227-
#!/bin/sh
227+
#!/bin/bash
228+
set -euo pipefail
229+
228230
trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/setup-success; else touch /tmp/exit /tmp/setup-failed; fi; exit "${rc}"' EXIT
229231
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM
230232
cp "$(command -v openshift-install)" /tmp
@@ -362,6 +364,8 @@ objects:
362364
- -c
363365
- |
364366
#!/bin/bash
367+
set -euo pipefail
368+
365369
function queue() {
366370
local TARGET="${1}"
367371
shift

ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ objects:
158158
- -c
159159
- |
160160
#!/bin/bash
161-
# error handling and sync code
162161
set -euo pipefail
163162
164163
trap 'touch /tmp/shared/exit' EXIT
@@ -271,7 +270,7 @@ objects:
271270
- /bin/bash
272271
- -c
273272
- |
274-
#!/bin/bash
273+
#!/bin/bash
275274
set -euo pipefail
276275
277276
trap 'rc=$?; if [[ $rc -ne 0 ]]; then
@@ -361,6 +360,7 @@ objects:
361360
- -c
362361
- |
363362
#!/bin/bash
363+
set -euo pipefail
364364
365365
# teardown is collecting debug data and deleting all used resources
366366
function teardown() {

0 commit comments

Comments
 (0)