forked from openshift-metal3/dev-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrhcos.sh
More file actions
11 lines (9 loc) · 729 Bytes
/
rhcos.sh
File metadata and controls
11 lines (9 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
# Get the git commit that the openshift installer was built from
OPENSHIFT_INSTALL_COMMIT=$($OPENSHIFT_INSTALLER version | grep commit | cut -d' ' -f4)
# Get the rhcos.json for that commit
OPENSHIFT_INSTALLER_RHCOS=${OPENSHIFT_INSTALLER_RHCOS:-https://raw.githubusercontent.com/openshift/installer/$OPENSHIFT_INSTALL_COMMIT/data/data/rhcos.json}
# Get the rhcos.json for that commit, and find the baseURI and openstack image path
RHCOS_IMAGE_JSON=$(curl "${OPENSHIFT_INSTALLER_RHCOS}")
export RHCOS_INSTALLER_IMAGE_URL=$(echo "${RHCOS_IMAGE_JSON}" | jq -r '.baseURI + .images.openstack.path')
export RHCOS_IMAGE_URL=${RHCOS_IMAGE_URL:-${RHCOS_INSTALLER_IMAGE_URL}}
export RHCOS_IMAGE_FILENAME_LATEST="rhcos-ootpa-latest.qcow2"