Skip to content

Commit

Permalink
Skip tasks with no bundle
Browse files Browse the repository at this point in the history
Certain tasks needs to be skipped in case a no bundle is being released.

Signed-off-by: Ales Raszka <[email protected]>
  • Loading branch information
Allda authored and RichardPlesnik committed Jun 27, 2024
1 parent d309d76 commit 0d34c63
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ spec:
input: "$(tasks.certification-project-check.results.certification_project_id)"
operator: "notin"
values: [""]
- input: "$(tasks.detect-changes.results.added_bundle)"
operator: "notin"
values: [""]
params:
- name: pipeline_image
value: "$(params.pipeline_image)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ spec:
script: |
set -xe
if [[ "$(params.dest_image_tag)" == "" ]]; then
echo "A pipeline is not releasing a bundle. Skipping a copy step.."
echo -n > "$(results.container_digest.path)"
echo -n "$(params.src_image)" > "$(results.image_pullspec.path)"
exit 0
fi
# Save data about released bundle to volume
RELEASE_INFO_DIR_PATH="$(workspaces.output.path)/release_info"
mkdir -p "$RELEASE_INFO_DIR_PATH"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
CONFIG_PATH="$(params.operator_path)/ci.yaml"
if [[ ! -f "$CONFIG_PATH" || -z "$(params.bundle_path)" ]]; then
if [[ ! -f "$CONFIG_PATH" ]]; then
echo "Config file $CONFIG_PATH does not exist or no bundle affected."
echo "replaces" | tee $(results.upgrade-graph-mode.path)
echo -n "false" | tee $(results.fbc-enabled.path)
Expand Down

0 comments on commit 0d34c63

Please sign in to comment.