Skip to content

Commit

Permalink
prefetch-dependencies: Make the task fail if the input is empty
Browse files Browse the repository at this point in the history
This change aims to make it clear that a successful execution of the
prefetch-dependencies task means that Cachi2 was executed successfully,
as opposed to the task being executed as a no-op.

Accepting an empty input was initially allowed because, previously, the
task execution was tied to hermetic builds, and we wanted to allow use
cases in which there could be a hermetic build but no prefetch. Since
this behavior is now changed, allowing the task to be a no-op is no
longer necessary.

Signed-off-by: Bruno Pimentel <[email protected]>
  • Loading branch information
brunoapimentel committed May 23, 2024
1 parent 18295e5 commit bbf339e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ spec:
mountPath: /mnt/trusted-ca
readOnly: true
script: |
if [ -z "${INPUT}" ]
then
# Confirm input was provided though it's likely the whole task would be skipped if it wasn't
echo "No prefetch will be performed because no input was provided for cachi2 fetch-deps"
exit 0
fi
if [ "$DEV_PACKAGE_MANAGERS" = "true" ]; then
dev_pacman_flag=--dev-package-managers
else
Expand Down
7 changes: 0 additions & 7 deletions task/prefetch-dependencies/0.1/prefetch-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ spec:
mountPath: /mnt/trusted-ca
readOnly: true
script: |
if [ -z "${INPUT}" ]
then
# Confirm input was provided though it's likely the whole task would be skipped if it wasn't
echo "No prefetch will be performed because no input was provided for cachi2 fetch-deps"
exit 0
fi
if [ "$DEV_PACKAGE_MANAGERS" = "true" ]; then
dev_pacman_flag=--dev-package-managers
else
Expand Down

0 comments on commit bbf339e

Please sign in to comment.