Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
test: use latest url for post-GA builds
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Shi <[email protected]>
  • Loading branch information
shi2wei3 committed May 13, 2024
1 parent bd59391 commit a6f9a37
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
11 changes: 6 additions & 5 deletions .tekton/testing-farm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ spec:
IMAGE_URL=quay.io/redhat_emp1/qe-"${IMAGE_NAME}:${IMAGE_TAG}"
echo "$IMAGE_URL"
if [[ $IMAGE_NAME =~ ^rhel-bootc || $IMAGE_NAME =~ ^centos-bootc || $IMAGE_NAME =~ ^fedora-bootc ]]; then
COMPOSE_ID=$(jq -r '.Labels."redhat.compose-id"' skopeo_inspect.json)
if [[ "${COMPOSE_ID}" == "RHEL-"* ]]; then
COMPOSE=$(echo "${COMPOSE_ID}" | grep -o '^RHEL-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*')-Nightly
elif [[ "${COMPOSE_ID}" == "CentOS-Stream-"* ]]; then
COMPOSE=$(echo "${COMPOSE_ID}" | grep -o '^CentOS-Stream-[0-9][0-9]*')
REDHAT_ID=$(jq -r '.Labels.redhat.id' skopeo_inspect.json)
REDHAT_VERSION_ID=$(jq -r '.Labels."redhat.version-id"' skopeo_inspect.json)
if [[ "${REDHAT_ID}" == "rhel" ]]; then
COMPOSE=RHEL-${REDHAT_VERSION_ID}.0-Nightly
elif [[ "${REDHAT_ID}" == "centos" ]]; then
COMPOSE=CentOS-Stream-${REDHAT_VERSION_ID}
else
COMPOSE=Fedora-Rawhide
fi
Expand Down
4 changes: 2 additions & 2 deletions anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ case "$REDHAT_ID" in
"rhel")
# work with old TEST_OS variable value rhel-9-x
TEST_OS=$(echo "${REDHAT_ID}-${REDHAT_VERSION_ID}" | sed 's/\./-/')
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee rhel-9-y.repo > /dev/null
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_BATCH_COMPOSE/${BATCH_COMPOSE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee rhel-9-y.repo > /dev/null
ADD_REPO="COPY rhel-9-y.repo /etc/yum.repos.d/rhel-9-y.repo"
ADD_RHC="RUN dnf install -y rhc"
BOOT_LOCATION="http://${DOWNLOAD_NODE}/rhel-9/composes/RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/${ARCH}/os/"
BOOT_LOCATION="http://${DOWNLOAD_NODE}/rhel-9/nightly/${BATCH_COMPOSE}RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/${ARCH}/os/"
OS_VARIANT="rhel9-unknown"
BOOT_ARGS="uefi"
CUT_DIRS=8
Expand Down
6 changes: 3 additions & 3 deletions bib-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ case "$REDHAT_ID" in
TEST_IMAGE_URL="quay.io/redhat_emp1/${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}"
LOCAL_IMAGE_URL="localhost/${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}"
SSH_USER="cloud-user"
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee "${LAYERED_DIR}"/rhel-9-y.repo > /dev/null
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_BATCH_COMPOSE/${BATCH_COMPOSE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee "${LAYERED_DIR}"/rhel-9-y.repo > /dev/null
ADD_REPO="COPY rhel-9-y.repo /etc/yum.repos.d/rhel-9-y.repo"
ADD_RHC="RUN dnf install -y rhc"
if [[ "$PLATFORM" == "aws" ]]; then
Expand All @@ -62,12 +62,12 @@ case "$REDHAT_ID" in
yum_repos:
rhel-9y-baseos:
name: rhel-9y-baseos
baseurl: http://${DOWNLOAD_NODE}/rhel-9/composes/RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/\$basearch/os/
baseurl: http://${DOWNLOAD_NODE}/rhel-9/nightly/${BATCH_COMPOSE}RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/\$basearch/os/
enabled: true
gpgcheck: false
rhel-9y-appstream:
name: rhel-9y-appstream
baseurl: http://${DOWNLOAD_NODE}/rhel-9/composes/RHEL-9/${CURRENT_COMPOSE_ID}/compose/AppStream/\$basearch/os/
baseurl: http://${DOWNLOAD_NODE}/rhel-9/nightly/${BATCH_COMPOSE}RHEL-9/${CURRENT_COMPOSE_ID}/compose/AppStream/\$basearch/os/
enabled: true
gpgcheck: false
EOF
Expand Down
4 changes: 2 additions & 2 deletions files/rhel-9-y.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[rhel-9.y-baseos]
baseurl=http://REPLACE_ME/rhel-9/composes/RHEL-9/REPLACE_COMPOSE_ID/compose/BaseOS/$basearch/os/
baseurl=http://REPLACE_ME/rhel-9/nightly/REPLACE_BATCH_COMPOSERHEL-9/REPLACE_COMPOSE_ID/compose/BaseOS/$basearch/os/
enabled=1
gpgcheck=0

[rhel-9.y-appstream]
baseurl=http://REPLACE_ME/rhel-9/composes/RHEL-9/REPLACE_COMPOSE_ID/compose/AppStream/$basearch/os/
baseurl=http://REPLACE_ME/rhel-9/nightly/REPLACE_BATCH_COMPOSERHEL-9/REPLACE_COMPOSE_ID/compose/AppStream/$basearch/os/
enabled=1
gpgcheck=0

6 changes: 3 additions & 3 deletions os-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ case "$REDHAT_ID" in
# work with old TEST_OS variable value rhel-9-x
TEST_OS=$(echo "${REDHAT_ID}-${REDHAT_VERSION_ID}" | sed 's/\./-/')
SSH_USER="cloud-user"
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee "${LAYERED_DIR}"/rhel-9-y.repo > /dev/null
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/; s/REPLACE_BATCH_COMPOSE/${BATCH_COMPOSE}/; s/REPLACE_COMPOSE_ID/${CURRENT_COMPOSE_ID}/" files/rhel-9-y.template | tee "${LAYERED_DIR}"/rhel-9-y.repo > /dev/null
ADD_REPO="COPY rhel-9-y.repo /etc/yum.repos.d/rhel-9-y.repo"
ADD_RHC="RUN dnf install -y rhc"
if [[ "$PLATFORM" == "aws" ]]; then
Expand All @@ -48,12 +48,12 @@ case "$REDHAT_ID" in
yum_repos:
rhel-9y-baseos:
name: rhel-9y-baseos
baseurl: http://${DOWNLOAD_NODE}/rhel-9/composes/RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/\$basearch/os/
baseurl: http://${DOWNLOAD_NODE}/rhel-9/nightly/${BATCH_COMPOSE}RHEL-9/${CURRENT_COMPOSE_ID}/compose/BaseOS/\$basearch/os/
enabled: true
gpgcheck: false
rhel-9y-appstream:
name: rhel-9y-appstream
baseurl: http://${DOWNLOAD_NODE}/rhel-9/composes/RHEL-9/${CURRENT_COMPOSE_ID}/compose/AppStream/\$basearch/os/
baseurl: http://${DOWNLOAD_NODE}/rhel-9/nightly/${BATCH_COMPOSE}RHEL-9/${CURRENT_COMPOSE_ID}/compose/AppStream/\$basearch/os/
enabled: true
gpgcheck: false
EOF
Expand Down
10 changes: 10 additions & 0 deletions tools/shared_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ function image_inspect {
REDHAT_VERSION_ID=$(skopeo inspect --tls-verify=false "docker://${TIER1_IMAGE_URL}" | jq -r '.Labels."redhat.version-id"')
CURRENT_COMPOSE_ID=$(skopeo inspect --tls-verify=false "docker://${TIER1_IMAGE_URL}" | jq -r '.Labels."redhat.compose-id"')
fi
if [[ -n ${CURRENT_COMPOSE_ID} ]]; then
if [[ ${CURRENT_COMPOSE_ID} == *-updates-* ]]; then
BATCH_COMPOSE="updates/"
else
BATCH_COMPOSE=""
fi
else
BATCH_COMPOSE="updates/"
CURRENT_COMPOSE_ID=latest-RHEL-$REDHAT_VERSION_ID
fi
}

0 comments on commit a6f9a37

Please sign in to comment.