@@ -82,27 +82,39 @@ function create_config_image() {
8282 cp -r ${config_image_dir} /auth ${asset_dir}
8383}
8484
85+ # Build OVE ISO using script method
86+ function build_ove_iso_script() {
87+ local asset_dir=$1
88+ local release_image_url=$2
89+
90+ echo " Start building Agent OVE ISO"
91+ ./hack/build-ove-image.sh \
92+ --pull-secret-file " ${PULL_SECRET_FILE} " \
93+ --release-image-url " ${release_image_url} " \
94+ --ssh-key-file " ${SSH_KEY_FILE} " \
95+ --dir " ${asset_dir} " > /dev/null
96+ echo " Agent OVE ISO completed"
97+
98+ # Move the agent-ove iso in the default folder
99+ agent_iso_no_registry=$( get_agent_iso_no_registry)
100+ mv ${agent_iso_no_registry} " $SCRIPTDIR /$OCP_DIR "
101+ }
102+
85103function create_agent_iso_no_registry() {
86104 local asset_dir=${1}
87105
88- AGENT_ISO_BUILDER_IMAGE=$( getAgentISOBuilderImage)
89-
90- id=$( podman create --pull always --authfile " ${PULL_SECRET_FILE} " " ${AGENT_ISO_BUILDER_IMAGE} " ) && podman cp " ${id} " :/src " ${asset_dir} " && podman rm " ${id} "
91-
92106 # Update release_info.json as its needed by CI tests
93107 save_release_info ${OPENSHIFT_RELEASE_IMAGE} ${OCP_DIR}
94108
95- # Create agent ISO without registry a.k.a. OVE ISO
109+ AGENT_ISO_BUILDER_IMAGE=$( getAgentISOBuilderImage)
110+
111+ id=$( podman create --pull always --authfile " ${PULL_SECRET_FILE} " " ${AGENT_ISO_BUILDER_IMAGE} " ) && \
112+ podman cp " ${id} " :/src " ${asset_dir} " && \
113+ podman rm " ${id} "
114+
96115 pushd .
97116 cd " ${asset_dir} " /src
98- # Build the ISO in the container image
99- make build-ove-iso-container PULL_SECRET_FILE=" ${PULL_SECRET_FILE} " RELEASE_IMAGE_URL=" ${OPENSHIFT_RELEASE_IMAGE} " ARCH=${ARCH}
100- # Retrieve ISO from container
101- ./hack/iso-from-container.sh
102- local iso_name=" agent-ove.${ARCH} .iso"
103- echo " Moving ${iso_name} to ${asset_dir} "
104- mv ./output-iso/${iso_name} " ${asset_dir} "
105- rm -rf " ${asset_dir} " /src
117+ build_ove_iso_script " ${asset_dir} " " ${OPENSHIFT_RELEASE_IMAGE} "
106118 popd
107119}
108120
0 commit comments