Skip to content

Commit d8e590f

Browse files
author
Yolanda Robla
committed
Do not curl for release image if we provide it
When running on a disconnected install, the host does not have access to curl for the image version. But we can provide it on config file. So avoid looking for that release if we already are providing it. Signed-off-by: Yolanda Robla <[email protected]>
1 parent e4097f7 commit d8e590f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export LOCAL_REGISTRY_ADDRESS=${LOCAL_REGISTRY_ADDRESS:-"192.168.111.1:5000"}
4141
#
4242
# See https://openshift-release.svc.ci.openshift.org for release details
4343
#
44-
LATEST_CI_IMAGE=$(curl https://openshift-release.svc.ci.openshift.org/api/v1/releasestream/4.4.0-0.ci/latest | grep -o 'registry.svc.ci.openshift.org[^"]\+')
44+
# if we provide OPENSHIFT_RELEASE_IMAGE, do not curl. This is needed for offline installs
45+
if [ -z "${OPENSHIFT_RELEASE_IMAGE}" ]; then
46+
LATEST_CI_IMAGE=$(curl https://openshift-release.svc.ci.openshift.org/api/v1/releasestream/4.4.0-0.ci/latest | grep -o 'registry.svc.ci.openshift.org[^"]\+')
47+
fi
4548
export OPENSHIFT_RELEASE_IMAGE="${OPENSHIFT_RELEASE_IMAGE:-$LATEST_CI_IMAGE}"
4649
export OPENSHIFT_INSTALL_PATH="$GOPATH/src/github.com/openshift/installer"
4750

0 commit comments

Comments
 (0)