Skip to content

Commit d451cfe

Browse files
committed
Exclude sample app image from CD publishing process
Signed-off-by: Leo Christy Jesuraj <[email protected]>
1 parent 830b256 commit d451cfe

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.one-pipeline-cd.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ setup:
2323
echo "${DIGEST}"
2424
echo "${APP}" | jq '.'
2525
26+
if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then
27+
echo "Exclude samples from digest validation: ${ARTIFACT}"
28+
continue
29+
fi
30+
2631
SAVED_DIGEST="$(skopeo inspect docker://$ARTIFACT | jq '.Digest'| sed -e 's/"//g')"
2732
if [[ ${DIGEST} == ${SAVED_DIGEST} ]]; then
2833
echo "Image, $ARTIFACT, passes validation"
@@ -64,12 +69,19 @@ deploy:
6469
for INVENTORY_ENTRY in $(echo "${INVENTORY_ENTRIES}" | jq -r '.[] '); do
6570
APP=$(cat "${INVENTORY_PATH}/${INVENTORY_ENTRY}")
6671
ARTIFACT=$(echo "${APP}" | jq -r '.artifact')
72+
echo "${ARTIFACT}"
73+
74+
if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then
75+
echo "Exclude samples from publishing: ${ARTIFACT}"
76+
continue
77+
fi
78+
6779
NAME=$(echo "${APP}" | jq -r '.name')
6880
DIGEST=$(echo "${APP}" | jq -r '.sha256' )
6981
TYPE=$(echo "${APP}" | jq -r '.type' )
7082
REPO=$(echo "${APP}" | jq -r '.repository_url' ).git
7183
COMMIT=$(echo "${APP}" | jq -r '.commit_sha' )
72-
echo "${ARTIFACT}"
84+
7385
#echo "${ARTIFACT##*/}"
7486
IMAGE_NAME="${ARTIFACT##*/}"
7587
echo "Image name: $IMAGE_NAME"

0 commit comments

Comments
 (0)