Skip to content

Commit

Permalink
fix: release scripts to run single script
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed May 22, 2022
1 parent 711facd commit d67e4e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ for catalog in "${redhatCatalogs[@]}"; do
myenv=$EXAMPLE yq -i e ".metadata.annotations.alm-examples |= (\"\${myenv}\" | envsubst)" bundles/$catalog/$RELEASE/manifests/$package.clusterserviceversion.yaml

# Avoid message: "There are unpinned images digests!" by using Digest Sha256:xxxx rather than vx.x.x
containerImage="quay.io/minio/operator:v$RELEASE"
containerImage="quay.io/minio/operator:v${RELEASE}"
echo "containerImage: ${containerImage}"
digest=$(docker pull $containerImage | grep Digest | awk -F ' ' '{print $2}')
operatorImageDigest="quay.io/minio/operator:${RELEASE}"
echo "digest: ${operatorImageDigest} @ ${digest}"
operatorImageDigest="quay.io/minio/operator:v${RELEASE}"
if [ -n "${digest}" ]; then
echo "digest: ${operatorImageDigest} @ ${digest}"
else
echo "digest: ${operatorImageDigest}"
fi
yq -i ".metadata.annotations.containerImage |= (\"${operatorImageDigest}\")" bundles/$catalog/$RELEASE/manifests/$package.clusterserviceversion.yaml

# Console Image in Digested form: sha256:xxxx
Expand Down
6 changes: 3 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ then
fi

for file in "${files[@]}"; do
sed -e "s/${LATEST_RELEASE}/${RELEASE}/g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
sed -e "s/RELEASE\.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]-[0-9][0-9]-[0-9][0-9]Z/${MINIO_RELEASE}/g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
sed -e "s/${CONSOLE_FROM}/${CONSOLE_RELEASE}/g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
sed -i -e "s/${LATEST_RELEASE}/${RELEASE}/g" "$file"
sed -i -e "s/RELEASE\.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]-[0-9][0-9]-[0-9][0-9]Z/${MINIO_RELEASE}/g"
sed -i -e "s/${CONSOLE_FROM}/${CONSOLE_RELEASE}/g" "$file"
done

0 comments on commit d67e4e2

Please sign in to comment.