Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwcook committed Nov 2, 2024
1 parent f432cc9 commit 9defc40
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ spec:
- name: WORKSPACE_NETRC_PATH
value: $(workspaces.netrc.path)
script: |
#!/bin/bash
trap 'cleanup_on_exit' EXIT
INPUT=$(cat /shared/rhsm/preprocessed_input)
export INPUT
Expand Down Expand Up @@ -368,8 +369,6 @@ spec:
cachi2 --log-level="$LOG_LEVEL" inject-files /var/workdir/cachi2/output \
--for-output-dir=/cachi2/output
trap 'cleanup' EXIT
- name: create-trusted-artifact
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac
args:
Expand Down
19 changes: 12 additions & 7 deletions task/prefetch-dependencies/0.1/prefetch-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ spec:
name: shared
script: |
#!/bin/bash
# Function for cleanup on script exit
cleanup_on_exit() {
echo "Performing cleanup tasks before script exit..."
# run any needed cleanup
rv=$?
subscription-manager unregister
exit "$rv"
}
trap 'cleanup_on_exit' EXIT
INPUT=$(cat /shared/rhsm/preprocessed_input)
export INPUT
Expand Down Expand Up @@ -283,14 +295,7 @@ spec:
cachi2 --log-level="$LOG_LEVEL" inject-files $(workspaces.source.path)/cachi2/output \
--for-output-dir=/cachi2/output
cleanup() {
# run any needed cleanup
which subscription-manager
subscription-manager unregister
exit "$1"
}
trap 'cleanup' EXIT

Check failure on line 299 in task/prefetch-dependencies/0.1/prefetch-dependencies.yaml

View workflow job for this annotation

GitHub Actions / yamllint

299:1 [empty-lines] too many blank lines (3 > 2)
workspaces:
- name: source
Expand Down

0 comments on commit 9defc40

Please sign in to comment.