Skip to content

Commit dfd0823

Browse files
acornett21Allda
authored andcommitted
updating all scripts to exit on non-zero status
Signed-off-by: Adam D. Cornett <[email protected]>
1 parent d507ba6 commit dfd0823

File tree

11 files changed

+25
-1
lines changed

11 files changed

+25
-1
lines changed

ansible/roles/index_signature_verification/files/tasks/verify-index-signatures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ spec:
9999
value: vfs
100100
script: |
101101
#!/usr/bin/env bash
102-
103102
set +x -e -o pipefail
103+
104104
cp /etc/containers/policy.json /tmp/
105105
podman image trust set --policypath=/tmp/policy.json -f /mnt/keys/pub.gpg registry.redhat.io
106106
for pull_spec in $(cat image-digests.txt); do

ansible/roles/operator-pipeline/templates/openshift/tasks/acquire-lock.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ spec:
2020
- name: create-lease
2121
image: "$(params.pipeline_image)"
2222
script: |
23+
set -xe
24+
2325
calculate_duration_in_seconds() {
2426
if [ "${1: -1}" == "m" ]; then
2527
TOTAL_DURATION_IN_SECONDS=$((${1:: -1} * 60))

ansible/roles/operator-pipeline/templates/openshift/tasks/buildah.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ spec:
5757
name: build
5858
computeResources: {}
5959
script: |
60+
set -xe
61+
6062
echo "Building $(params.IMAGE)"
6163
buildah --storage-driver=$(params.STORAGE_DRIVER) bud \
6264
$(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \

ansible/roles/operator-pipeline/templates/openshift/tasks/dockerfile-creation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ spec:
1717
workingDir: $(workspaces.source.path)
1818
script: |
1919
#! /usr/bin/env bash
20+
set -xe
21+
2022
DOCKERFILE_PATH=Dockerfile
2123
2224
bundle-dockerfile \

ansible/roles/operator-pipeline/templates/openshift/tasks/get-ci-results-attempt.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ spec:
7575
value: test_results.json
7676
script: |
7777
#! /usr/bin/env bash
78+
set -xe
7879
7980
if [ -f $RESULTS_FILE ]; then
8081
echo "Results exist"

ansible/roles/operator-pipeline/templates/openshift/tasks/get-ci-reviewer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
script: |
3636
#! /usr/bin/env bash
3737
set -e
38+
3839
# storing repo maintainers from config.yaml file
3940
MAINTAINERS="config.yaml"
4041
yq -r '(.maintainers//[])[]' $MAINTAINERS >$(results.repo_maintainers.path)
@@ -59,6 +60,7 @@ spec:
5960
script: |
6061
#! /usr/bin/env bash
6162
set -e
63+
6264
AUTHOR_IS_REVIEWER=$(cat $(results.author_is_reviewer.path))
6365
CI_REVIEWERS=$(cat $(results.list_reviewers.path))
6466
REPO_MAINTAINERS=$(cat $(results.repo_maintainers.path))

ansible/roles/operator-pipeline/templates/openshift/tasks/merge-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ spec:
3232
image: "$(params.pipeline_image)"
3333
workingDir: $(workspaces.source.path)
3434
script: |
35+
set -xe
3536
if [ "$(params.force_merge)" = "true" ]; then
3637
echo -n true > "$(results.bool_merge.path)"
3738
elif [[ "$(params.bundle_path)" == "" ]]; then

ansible/roles/operator-pipeline/templates/openshift/tasks/release-locks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ spec:
1515
- name: delete-lease
1616
image: "$(params.pipeline_image)"
1717
script: |
18+
set -xe
19+
1820
oc delete lease -l owner-id="$(params.lease-owner)" --ignore-not-found=true

ansible/roles/operator-pipeline/templates/openshift/tasks/upload-artifact.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ spec:
7070
mountPath: "/etc/pyxis-ssl-volume"
7171
script: |
7272
#! /usr/bin/env bash
73+
set -xe
74+
7375
PREFLIGHT_RESULTS_EXISTS="$(params.preflight_results_exists)"
7476
if [ $PREFLIGHT_RESULTS_EXISTS == "true" ]; then
7577
echo "Preflight logs already exists - skipping"
@@ -116,6 +118,8 @@ spec:
116118
mountPath: "/etc/pyxis-ssl-volume"
117119
script: |
118120
#! /usr/bin/env bash
121+
set -xe
122+
119123
PREFLIGHT_RESULTS_EXISTS="$(params.preflight_results_exists)"
120124
if [ $PREFLIGHT_RESULTS_EXISTS == "true" ]; then
121125
echo "Preflight results already exists - skipping"
@@ -170,6 +174,8 @@ spec:
170174
mountPath: "/etc/pyxis-ssl-volume"
171175
script: |
172176
#! /usr/bin/env bash
177+
set -xe
178+
173179
PREFLIGHT_RESULTS_EXISTS="$(params.preflight_results_exists)"
174180
if [ $PREFLIGHT_RESULTS_EXISTS == "true" ]; then
175181
exit 0

ansible/roles/operator-pipeline/templates/openshift/tasks/verify-pinned-digest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ spec:
1515
image: "$(params.ubi8_minimal_image)"
1616
script: |
1717
#! /usr/bin/env bash
18+
set -xe
19+
1820
DIRTY_FLAG="$(params.dirty_flag)"
1921
echo $DIRTY_FLAG
2022
if [ $DIRTY_FLAG == "true" ]; then
@@ -25,6 +27,8 @@ spec:
2527
image: "$(params.ubi8_minimal_image)"
2628
script: |
2729
#! /usr/bin/env bash
30+
set -xe
31+
2832
RELATED_IMAGES_FLAG="$(params.related_images_flag)"
2933
echo $RELATED_IMAGES_FLAG
3034
if [ $RELATED_IMAGES_FLAG == "false" ]; then

0 commit comments

Comments
 (0)