Skip to content

Commit

Permalink
fixup! Refactor for correct behaviour in case of skiping steps
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardPlesnik committed Jun 27, 2024
1 parent 7690bbf commit d309d76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
# Save data about released bundle to volume
RELEASE_INFO_DIR_PATH="$(workspaces.output.path)/release_info"
mkdir "$RELEASE_INFO_DIR_PATH"
mkdir -p "$RELEASE_INFO_DIR_PATH"
echo "- $(params.src_image)" | tee "$RELEASE_INFO_DIR_PATH/released_bundle.txt"
if [[ "$(params.vendor_label)" == "" ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ spec:
fi
# Add info how to update catalog for FBC bundles
if [[ "$(params.fbc-enabled)" == "true" ]]; then
if [[ "$(params.fbc-enabled)" == "true" && -f "$RELEASE_INFO_DIR_PATH/released_bundle.txt" ]]; then
echo -e "\n## Catalog update\n" >> "$PR_NAME/comment.md"
echo -e "Operator bundle using FBC mode has been released.\nTo add bundle to FBC templates, follow [this guide](https://redhat-openshift-ecosystem.github.io/operator-pipelines/users/fbc_workflow/#adding-new-bundle-to-catalog) to create a new PR with catalog changes." >> "$PR_NAME/comment.md"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ spec:
else
FROM_INDEX_PROXY="registry.stage.redhat.io/redhat/${INDEX_NAME}"
fi
# Create folder for release info if it's non-existent
RELEASE_INFO_DIR_PATH="$(workspaces.output.path)/release_info"
mkdir -p "$RELEASE_INFO_DIR_PATH"
echo "Copying index images to published repos..."
TEMP_IMAGES=$(echo $(params.index_image_paths) | tr "," " ")
Expand Down Expand Up @@ -133,7 +137,6 @@ spec:
docker://$SRC_IMAGE \
docker://$DEST_IMAGE_PERMANENT_TAG
# Save data about indexes to volume
RELEASE_INFO_DIR_PATH="$(workspaces.output.path)/release_info"
# Save data about updated indices to volume
echo "- ${FROM_INDEX_PROXY}:${VERSION}" | tee -a "$RELEASE_INFO_DIR_PATH/updated_indices.txt"
done

0 comments on commit d309d76

Please sign in to comment.