Skip to content

Commit

Permalink
testing trap
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwcook committed Nov 1, 2024
1 parent cbdf855 commit e032884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ spec:
cachi2 --log-level="$LOG_LEVEL" inject-files /var/workdir/cachi2/output \
--for-output-dir=/cachi2/output
trap "cleanup" EXIT
trap 'cleanup' EXIT
- name: create-trusted-artifact
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:e0e457b6af10e44ff6b90208a9e69adc863a865e1c062c4cb84bf3846037d74d
args:
Expand Down
11 changes: 6 additions & 5 deletions task/prefetch-dependencies/0.1/prefetch-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,14 @@ spec:
--for-output-dir=/cachi2/output
cleanup() {
# run any needed cleanup commands and retain exit code of last run command
rv=$?
subscription-manager unregister
exit $rv
exit_code=$?
# run any needed cleanup
which subscription-manager
subscription-manager unregister
exit $1
}
trap "cleanup" EXIT
trap 'cleanup' EXIT
workspaces:
- name: source
Expand Down

0 comments on commit e032884

Please sign in to comment.