Last active
December 17, 2024 19:11
-
-
Save nickboldt/91d5536b5eacda433749dedb9bb8c7c0 to your computer and use it in GitHub Desktop.
konflux snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to check that CI is up to date, use RHDH_VERSION=1 | |
# for declaring RC, use RHDH_VERSION=1.y | |
RHDH_VERSION=1.4 | |
echo "Latest images:"; | |
./build/scripts/getLatestImageTags.sh -b rhdh-${RHDH_VERSION}-rhel-9 --quay; | |
echo; echo "Images in latest bundle (should be the same hub + operator):"; | |
./build/scripts/checkImagesInCSV.sh -q -y \ | |
$(./build/scripts/getLatestImageTags.sh -b rhdh-${RHDH_VERSION}-rhel-9 --quay -c rhdh/rhdh-operator-bundle) | |
echo;echo -e "If newer images exist than those in the bundle run this:\n\ | |
\n\ | |
./build/ci/sync-midstream.sh --bundleonly --force --latest -b rhdh-1.4-rhel-9" | |
echo; echo -e "When the build is done in about 5 mins, click the most recent pipeline run at \n\ | |
https://konflux.apps.stone-prod-p02.hjvn.p1.openshiftapps.com/application-pipeline/workspaces/rhdh/applications/rhdh-1-4/activity/pipelineruns?name=rhdh-operator-bundle-1-4-on-push \n\ | |
\n\ | |
Observe the value of Snapshot, eg., rhdh-1-4-jxgmt. You'll need this later to do a release! \n\ | |
\n\ | |
Click through to the snapshot link, and copy the image references to check which tags they represent: \n\ | |
\n\ | |
./build/scripts/getTagForSHA.sh -q -y quay.io/rhdh/rhdh-hub-rhel9@sha256:8cfadda9c15fb0e1a4b0e5f8613d62433f92f42e16f3c7ea63be36bd9e5d2a1f quay.io/rhdh/rhdh-rhel9-operator@sha256:92dc1473d5372bd0070e183b62715d1616afd1131420f895ea0ee5569e072868 quay.io/rhdh/rhdh-operator-bundle@sha256:fb9b05836afb62693ae1e6d31539cf24893a721c3b361faadb9dc4da4191ccc4; echo; \n\ | |
./build/scripts/checkImagesInCSV.sh quay.io/rhdh/rhdh-operator-bundle@sha256:fb9b05836afb62693ae1e6d31539cf24893a721c3b361faadb9dc4da4191ccc4 -q -y \n\ | |
\n\ | |
quay.io/rhdh/rhdh-hub-rhel9:1.4-118 | |
quay.io/rhdh/rhdh-rhel9-operator:1.4-122 | |
quay.io/rhdh/rhdh-operator-bundle:1.4-120 | |
quay.io/rhdh/rhdh-hub-rhel9:1.4-118 | |
quay.io/rhdh/rhdh-rhel9-operator:1.4-122 | |
registry.redhat.io/rhel9/postgresql-15:1-1733127512 | |
" | |
############################################################## | |
# TODO convert this into a nudge script that fires on every new rhdh-hub or operator image push to quay | |
############################################################## | |
# ./build/ci/sync-midstream.sh --bundleonly --force --latest -b rhdh-1.4-rhel-9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################## | |
# TODO convert this into a nudge script that fires on every new rhdh-hub image push to quay | |
############################################################## | |
# for pushing latest charts | |
# login as bot | |
ghtdh | |
LATEST_RHDH=1.4 | |
cd ~/4/4-rhdh-midstream; git checkout rhdh-${LATEST_RH}-rhel-9 | |
./build/helm/prepare.sh --latest --chart-branch release-${LATEST_RHDH} --publish --extra-branch rhdh-${RHDH_VERSION}-rhel-9 | |
## OR for 1.next | |
# cd ~/4/4-rhdh-midstream; git checkout rhdh-1-rhel-9 | |
# ./build/helm/prepare.sh --next --chart-branch main --publish --extra-branch rhdh-1-rhel-9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################## | |
# TODO convert this into a nudge script that fires on every new bundle image push to quay | |
############################################################## | |
# for publishing updated FBCs | |
cd ~/4/4-rhdh-midstream | |
LATEST_CSV=1.4.0 | |
for v in 4.14 4.15 4.16 4.17; do | |
./build/scripts/renderCatalogs.sh --latest --clean -v ${LATEST_CSV} --versions $v; | |
echo 'Sleep 1 min to avoid Konflux tag collisions'; sleep 60s; echo; | |
done | |
# workaround for glitchy 4.18 index | |
cp -f catalogs/v4.17/catalog-template.json catalogs/v4.18/catalog-template.json | |
# use template, don't re-render it | |
./build/scripts/renderCatalogs.sh --latest --clean -v ${LATEST_CSV} --versions 4.18 \ | |
--template catalogs/v4.18/catalog-template.json | |
## or for 1.next | |
# NEXT_CSV=1.5.0 | |
# for v in 4.14 4.15 4.16 4.17; do | |
# ./build/scripts/renderCatalogs.sh --next --clean -v ${NEXT_CSV} --versions $v; | |
# echo 'Sleep 1 min to avoid Konflux tag collisions'; sleep 60s; echo; | |
# done | |
## workaround for glitchy 4.18 index | |
# cp -f catalogs/v4.17/catalog-template.json catalogs/v4.18/catalog-template.json | |
## use template, don't re-render it | |
# ./build/scripts/renderCatalogs.sh --latest --clean -v ${LATEST_CSV} --versions 4.18 \ | |
# --template catalogs/v4.18/catalog-template.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the --rhec flag to switch from quay.io -> rr.io after containers are live | |
cd ~/4/4-rhdh-midstream | |
LATEST_CSV=1.4.0 | |
for v in 4.14 4.15 4.16 4.17; do | |
# while using quay.io/rhdh is fine for CI and stage builds, must | |
# switch to GA image reference to avoid warning-failures from blocking the release | |
./build/scripts/renderCatalogs.sh --latest --clean -v ${LATEST_CSV} --versions $v \ | |
--template catalogs/v${v}/catalog-template.json --rhec | |
echo 'Sleep 1 min to avoid Konflux tag collisions'; sleep 60s; echo; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment