Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: compute latest ubi8 tag and use that instead of hardcoding '8.8' in three places and forgetting to update that when a new RHEL8.y version drops (currently 8.9-1029) #537

Open
wants to merge 1 commit into
base: devspaces-3-rhel-8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions devspaces-operator-bundle/build/scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,16 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 \\
EOT
echo "Generated Dockerfile"

"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/"
"${TARGETDIR}"/build/scripts/sync-che-olm.sh -v "${CSV_VERSION}" -p "${CSV_VERSION_PREV}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/"
curl -sSL https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh --output /tmp/getLatestImageTags.sh
if [[ $(cat /tmp/getLatestImageTags.sh) == *"404"* ]] || [[ $(cat /tmp/getLatestImageTags.sh) == *"Not Found"* ]]; then
echo "[ERROR] Could not load https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh"
exit 1
fi
chmod +x /tmp/getLatestImageTags.sh
UBI_TAG=$(/tmp/getLatestImageTags.sh -c ubi8/ubi-minimal --tag "8."); UBI_TAG=${UBI_TAG##*:}

"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}"
"${TARGETDIR}"/build/scripts/sync-che-olm.sh -v "${CSV_VERSION}" -p "${CSV_VERSION_PREV}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}"

pushd "${TARGETDIR}"/ >/dev/null || exit
rm -fr api/ bundle/ config/ controllers/ hack/ mocks/ pkg/ vendor/ version/ go.* *.go
Expand Down
10 changes: 9 additions & 1 deletion devspaces-operator/build/scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,12 @@ LABEL com.redhat.delivery.appregistry="false" \\
EOT
echo "Converted Dockerfile"

"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/"
curl -sSL https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh --output /tmp/getLatestImageTags.sh
if [[ $(cat /tmp/getLatestImageTags.sh) == *"404"* ]] || [[ $(cat /tmp/getLatestImageTags.sh) == *"Not Found"* ]]; then
echo "[ERROR] Could not load https://raw.githubusercontent.com/redhat-developer/devspaces/${MIDSTM_BRANCH}/product/getLatestImageTags.sh"
exit 1
fi
chmod +x /tmp/getLatestImageTags.sh
UBI_TAG=$(/tmp/getLatestImageTags.sh -c ubi8/ubi-minimal --tag "8."); UBI_TAG=${UBI_TAG##*:}

"${TARGETDIR}"/build/scripts/sync-che-operator.sh -v "${CSV_VERSION}" -s "${SOURCEDIR}/" -t "${TARGETDIR}/" --ubi-tag "${UBI_TAG}"