Skip to content
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
8 changes: 4 additions & 4 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ virtual_machines:
rhcos:
project: rhcos-cloud
images:
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing 4.16? It is still has extended support as per https://access.redhat.com/support/policy/updates/openshift#dates

- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.14') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.12') }}"
username: core
Expand All @@ -93,9 +93,9 @@ virtual_machines:
arch: arm64
machine_type: t2a-standard-2
images:
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19 aarch64.images.gcp.name') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-10') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-9') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18 aarch64.images.gcp.name') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16 aarch64.images.gcp.name') }}"
username: core
ignition:
ignition:
Expand Down
12 changes: 10 additions & 2 deletions ansible/scripts/fetch_ocp_rhcos_bootimage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <ocp-version> [<architectures.path>]"
echo "Usage: $0 <ocp-version> [<architectures.path>] [<rhel-variant>]"
exit 1
fi

Expand All @@ -10,7 +10,15 @@ OCP_VERSION=$1
# Json path with architecture and image name, e.g., x86_64.images.gcp.name or s390x.artifacts.ibmcloud.release
JSONPATH=${2:-"x86_64.images.gcp.name"}

URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json"
# Optional RHEL variant (e.g., rhel-9, rhel-10) for OCP 4.22+ which splits
# RHCOS images into separate coreos-rhel-9.json and coreos-rhel-10.json files.
RHEL_VARIANT=${3:-""}

if [ -n "$RHEL_VARIANT" ]; then
URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/coreos-${RHEL_VARIANT}.json"
else
URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json"
fi

json_data=$(curl --retry 5 --retry-delay 2 -sS "$URL")
if [ -z "$json_data" ]; then
Expand Down
Loading