Skip to content
Closed
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
20 changes: 19 additions & 1 deletion test/bin/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ configure_package_sources() {
export RHOCP_MINOR_Y
export RHOCP_MINOR_Y1
export RHOCP_MINOR_Y2
export RHOCP_MINOR_Y_BETA
export RHOCP_MINOR_Y1_BETA

# Add our sources. It is OK to run these steps repeatedly, if the
# details change they are updated in the service.
Expand Down Expand Up @@ -571,6 +573,15 @@ is_rhocp_available() {
return 1
}

is_rhocp_beta_available() {
local -r ver="${1}"
url="https://mirror.openshift.com/pub/openshift-v4/${UNAME_M}/dependencies/rpms/4.${ver}-el9-beta/"
if sudo dnf -v repository-packages --disablerepo '*' --repofrompath "this,${url}" this info cri-o 1>&2; then
return 0
fi
return 1
}

usage() {
if [ $# -gt 0 ] ; then
echo "ERROR: $*"
Expand Down Expand Up @@ -712,12 +723,19 @@ PREVIOUS_RELEASE_VERSION=$(echo "${previous_version_repo}" | cut -d, -f1)
PREVIOUS_RELEASE_REPO=$(echo "${previous_version_repo}" | cut -d, -f2)

RHOCP_MINOR_Y=""
RHOCP_MINOR_Y1=""
RHOCP_MINOR_Y_BETA=""
if is_rhocp_available "${MINOR_VERSION}"; then
RHOCP_MINOR_Y="${MINOR_VERSION}"
elif is_rhocp_beta_available "${MINOR_VERSION}"; then
RHOCP_MINOR_Y_BETA="https://mirror.openshift.com/pub/openshift-v4/${UNAME_M}/dependencies/rpms/4.${MINOR_VERSION}-el9-beta/"
fi

RHOCP_MINOR_Y1=""
RHOCP_MINOR_Y1_BETA=""
if is_rhocp_available "${PREVIOUS_MINOR_VERSION}"; then
RHOCP_MINOR_Y1="${PREVIOUS_MINOR_VERSION}"
elif is_rhocp_beta_available "${PREVIOUS_MINOR_VERSION}"; then
RHOCP_MINOR_Y1_BETA="https://mirror.openshift.com/pub/openshift-v4/${UNAME_M}/dependencies/rpms/4.${PREVIOUS_MINOR_VERSION}-el9-beta/"
fi

# For Y-2, there will always be a real repository, so we can always
Expand Down
9 changes: 9 additions & 0 deletions test/package-sources/rhocp-y.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ check_ssl = true
system = false
rhsm = true
{{- end -}}
{{- if env.Getenv "RHOCP_MINOR_Y_BETA" "" -}}
id = "rhocp-y"
name = "rhocp BETA"
type = "yum-baseurl"
url = "{{ .Env.RHOCP_MINOR_Y_BETA }}"
check_gpg = false
check_ssl = true
system = false
{{- end -}}
9 changes: 9 additions & 0 deletions test/package-sources/rhocp-y1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ check_ssl = true
system = false
rhsm = true
{{- end -}}
{{- if env.Getenv "RHOCP_MINOR_Y1_BETA" "" -}}
id = "rhocp-y1"
name = "rhocp Y-1 BETA"
type = "yum-baseurl"
url = "{{ .Env.RHOCP_MINOR_Y1_BETA }}"
check_gpg = false
check_ssl = true
system = false
{{- end -}}