Skip to content

Commit 20e767b

Browse files
author
Steven Hardy
authored
Conditionally copy rhcos.json (openshift#1317)
This is only needed in rhcos.sh for old versions which lack the openshift-install coreos-print-stream-json option, and the file moved in openshift/installer#5252 so we should only copy if the "old" location is detected
1 parent 2e28abc commit 20e767b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ocp_install_env.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@ function build_installer() {
8787
cd $OPENSHIFT_INSTALL_PATH
8888
TAGS="libvirt baremetal" hack/build.sh
8989
popd
90-
cp "$OPENSHIFT_INSTALL_PATH/data/data/rhcos.json" "$OCP_DIR"
90+
# This is only needed in rhcos.sh for old versions which lack the
91+
# openshift-install coreos-print-stream-json option
92+
# That landed in 4.8, and in 4.10 this file moved, so just
93+
# skip copying it if it's not in the "old" location ref
94+
# https://github.com/openshift/installer/pull/5252
95+
if [ -f "$OPENSHIFT_INSTALL_PATH/data/data/rhcos.json" ]; then
96+
cp "$OPENSHIFT_INSTALL_PATH/data/data/rhcos.json" "$OCP_DIR"
97+
fi
9198
}
9299

93100
function baremetal_network_configuration() {

0 commit comments

Comments
 (0)