Skip to content

Commit 9cd158a

Browse files
template: Use a more correct kill command
Avoids errors like ``` error: 51 fail, 36 pass, 129 skip (1h11m20s) kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] ```
1 parent e8d064a commit 9cd158a

24 files changed

+55
-55
lines changed

ci-operator/templates/master-sidecar-3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ objects:
6666
set -euo pipefail
6767
6868
trap 'touch /tmp/shared/exit' EXIT
69-
trap 'kill $(jobs -p); exit 0' TERM
69+
trap 'jobs -p | xargs -r kill; exit 0' TERM
7070
7171
# wait until the master job creates admin.kubeconfig
7272
while true; do
@@ -104,7 +104,7 @@ objects:
104104
echo "Gathering artifacts ..."
105105
}
106106
trap 'teardown' EXIT
107-
trap 'kill $(jobs -p); exit 0' TERM
107+
trap 'jobs -p | xargs -r kill; exit 0' TERM
108108
109109
(
110110
while true; do

ci-operator/templates/master-sidecar-4.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ objects:
122122
set -euo pipefail
123123
124124
trap 'touch /tmp/shared/exit' EXIT
125-
trap 'jobs -p | xargs kill || true; exit 0' TERM
125+
trap 'jobs -p | xargs -r kill; exit 0' TERM
126126
127127
# wait until the master job creates admin.kubeconfig
128128
while true; do

ci-operator/templates/master-sidecar-4.3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ objects:
122122
set -euo pipefail
123123
124124
trap 'touch /tmp/shared/exit' EXIT
125-
trap 'jobs -p | xargs kill || true; exit 0' TERM
125+
trap 'jobs -p | xargs -r kill; exit 0' TERM
126126
127127
# wait until the master job creates admin.kubeconfig
128128
while true; do

ci-operator/templates/master-sidecar-4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ objects:
122122
set -euo pipefail
123123
124124
trap 'touch /tmp/shared/exit' EXIT
125-
trap 'jobs -p | xargs kill || true; exit 0' TERM
125+
trap 'jobs -p | xargs -r kill; exit 0' TERM
126126
127127
# wait until the master job creates admin.kubeconfig
128128
while true; do

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ objects:
321321
322322
}
323323
324-
trap 'kill $(jobs -p); exit 0' TERM
324+
trap 'jobs -p | xargs -r kill; exit 0' TERM
325325
teardown
326326
327327
# Runs an install

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ objects:
110110
export PATH=/usr/libexec/origin:$PATH
111111
112112
trap 'touch /tmp/done' EXIT
113-
trap 'kill $(jobs -p); exit 0' TERM
113+
trap 'jobs -p | xargs -r kill; exit 0' TERM
114114
115115
mkdir -p "${HOME}"
116116

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ objects:
228228
export PATH=/tmp/shared:$PATH
229229
230230
trap 'touch /tmp/shared/exit' EXIT
231-
trap 'kill $(jobs -p); exit 0' TERM
231+
trap 'jobs -p | xargs -r kill; exit 0' TERM
232232
233233
function patch_image_specs() {
234234
cat <<EOF >samples-patch.yaml
@@ -863,7 +863,7 @@ objects:
863863
}
864864
865865
trap 'teardown' EXIT
866-
trap 'kill $(jobs -p); exit 0' TERM
866+
trap 'jobs -p | xargs -r kill; exit 0' TERM
867867
868868
for i in $(seq 1 220); do
869869
if [[ -f /tmp/shared/exit ]]; then

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ objects:
154154
export PATH=/usr/libexec/origin:$PATH
155155
156156
trap 'touch /tmp/shared/exit' EXIT
157-
trap 'kill $(jobs -p); exit 0' TERM
157+
trap 'jobs -p | xargs -r kill; exit 0' TERM
158158
159159
function fips_check() {
160160
oc --insecure-skip-tls-verify --request-timeout=60s get nodes -o jsonpath --template '{range .items[*]}{.metadata.name}{"\n"}{end}' > /tmp/nodelist
@@ -854,7 +854,7 @@ objects:
854854
}
855855
856856
trap 'teardown' EXIT
857-
trap 'kill $(jobs -p); exit 0' TERM
857+
trap 'jobs -p | xargs -r kill; exit 0' TERM
858858
859859
for i in $(seq 1 220); do
860860
if [[ -f /tmp/shared/exit ]]; then

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ objects:
127127
#!/bin/bash
128128
set -euo pipefail
129129
trap 'touch "${HOME}"/exit' EXIT
130-
trap 'kill $(jobs -p); exit 0' TERM
130+
trap 'jobs -p | xargs -r kill; exit 0' TERM
131131
mock-nss.sh
132132
gcloud auth activate-service-account \
133133
--quiet --key-file /tmp/cluster/gce.json
@@ -326,7 +326,7 @@ objects:
326326
}
327327
328328
trap 'teardown' EXIT
329-
trap 'kill $(jobs -p); exit 0' TERM
329+
trap 'jobs -p | xargs -r kill; exit 0' TERM
330330
331331
for i in `seq 1 180`; do
332332
if [[ -f /home/packer/exit ]]; then

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ objects:
124124
export PATH=/usr/libexec/origin:$PATH
125125
126126
trap 'touch /tmp/shared/exit' EXIT
127-
trap 'kill $(jobs -p); exit 0' TERM
127+
trap 'jobs -p | xargs -r kill; exit 0' TERM
128128
129129
mkdir -p "${HOME}"
130130
@@ -628,7 +628,7 @@ objects:
628628
}
629629
630630
trap 'teardown' EXIT
631-
trap 'kill $(jobs -p); exit 0' TERM
631+
trap 'jobs -p | xargs -r kill; exit 0' TERM
632632
633633
for i in $(seq 1 220); do
634634
if [[ -f /tmp/shared/exit ]]; then

0 commit comments

Comments
 (0)