diff --git a/ci-operator/templates/openshift/endurance/endurance-install.yaml b/ci-operator/templates/openshift/endurance/endurance-install.yaml index 629207e218d4a..187e3b6bf4311 100644 --- a/ci-operator/templates/openshift/endurance/endurance-install.yaml +++ b/ci-operator/templates/openshift/endurance/endurance-install.yaml @@ -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 @@ -153,7 +154,8 @@ objects: - /bin/bash - -c - | - #!/bin/bash -x + #!/bin/bash + set -eo pipefail export PATH=$PATH:/tmp/shared/bin @@ -377,7 +379,8 @@ objects: - /bin/sh - -c - | - #!/bin/sh -x + #!/bin/bash + set -euo pipefail export PATH=$PATH:/tmp/shared/bin diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml index ec98918777330..faa61574737a8 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml @@ -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 @@ -660,6 +660,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml index 10d85285eb448..9a029ab787270 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml @@ -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 @@ -731,6 +731,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml index 2d076bf013606..76367eb3508df 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml @@ -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' @@ -280,7 +281,8 @@ objects: - -c - | #!/bin/bash - set -euo pipefail + set -eo pipefail + function teardown() { # This is for running the gcloud commands mock-nss.sh diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml index a011906847840..bdf5ff1be9aab 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml @@ -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 @@ -515,6 +517,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml index 867cf8f8e6990..5b12879070f0a 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml @@ -445,6 +445,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-ovirt-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-ovirt-e2e.yaml index ec4f6cdf6eb79..bc8bbaf2df889 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-ovirt-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-ovirt-e2e.yaml @@ -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 @@ -449,6 +451,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml index 1e934f673c9ea..84497fbce979d 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml @@ -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 @@ -566,6 +566,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml index 1d3f804da1b01..9ed7660eeda26 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml @@ -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 -eo pipefail function queue() { local TARGET="${1}" diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml index af52259a13e0a..f1acb263b1a46 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml @@ -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 @@ -1073,6 +1074,7 @@ objects: - -c - | #!/bin/bash + set -eo pipefail function queue() { local TARGET="${1}" diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml index 5a282787b3779..5cc8c5140093b 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml @@ -255,6 +255,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function teardown() { set +e touch /tmp/shared/exit diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml index e724d58789a50..de38b87e65753 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml @@ -312,6 +312,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function teardown() { set +e touch /tmp/shared/exit diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml index 500cc61e95583..3d1d56359a403 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml @@ -260,6 +260,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function teardown() { set +e touch /tmp/shared/exit diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml index 9f0ec6e0d8b1e..de83f9f38597f 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml @@ -216,6 +216,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function teardown() { set +e touch /tmp/shared/exit diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml index 852a19ec7d7b8..a8a636171802d 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml @@ -199,6 +199,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function teardown() { set +e touch /tmp/shared/exit diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml index b01ca0a66c648..c2db5b4b579ee 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml @@ -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 @@ -362,6 +364,8 @@ objects: - -c - | #!/bin/bash + set -eo pipefail + function queue() { local TARGET="${1}" shift diff --git a/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml b/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml index 63e6cffc0be8e..8e9bac67354c0 100644 --- a/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml +++ b/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml @@ -158,7 +158,6 @@ objects: - -c - | #!/bin/bash - # error handling and sync code set -euo pipefail trap 'touch /tmp/shared/exit' EXIT @@ -271,7 +270,7 @@ objects: - /bin/bash - -c - | - #!/bin/bash + #!/bin/bash set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then @@ -361,6 +360,7 @@ objects: - -c - | #!/bin/bash + set -eo pipefail # teardown is collecting debug data and deleting all used resources function teardown() {