Skip to content

Commit

Permalink
Improve logging for image-changer
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Jul 26, 2023
1 parent efb5d1c commit 5f20173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions image-update/strimzi-image-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ do
echo "Filename for sync: $C_FILE"

if [[ $C_FILE == *"(Crd|ClusterRole-)"* ]]; then
echo "Syncing $C_FILE to $SHARED_YAML_BUNDLE_FILES"
if test -f "$TARGET_DIR/$SHARED_YAML_BUNDLE_FILES/$C_FILE"; then
export METADATA=$(yq e '.metadata' "$TARGET_DIR/$SHARED_YAML_BUNDLE_FILES/$C_FILE")
else
Expand All @@ -111,6 +112,7 @@ do
yq e -i '.metadata = env(METADATA)' "$TARGET_DIR/$SHARED_YAML_BUNDLE_FILES/$C_FILE"
fi
elif [[ $C_FILE == *"Deployment-"* ]]; then
echo "Syncing $C_FILE to $YAML_BUNDLE_PATH"
if test -f "$TARGET_DIR/$YAML_BUNDLE_PATH/$C_FILE"; then
export METADATA=$(yq e '.metadata' "$TARGET_DIR/$YAML_BUNDLE_PATH/$C_FILE")
else
Expand All @@ -122,6 +124,8 @@ do
if test -f "$TARGET_DIR/$YAML_BUNDLE_PATH/$C_FILE"; then
yq e -i '.metadata = env(METADATA)' "$TARGET_DIR/$YAML_BUNDLE_PATH/$C_FILE"
fi
else
echo "File $C_FILE didn't match any regex!"
fi
done

Expand Down

0 comments on commit 5f20173

Please sign in to comment.