@@ -3,6 +3,7 @@ set -euxo pipefail
33shopt -s nocasematch
44
55SCRIPTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd ) "
6+ ARCH=$( uname -m)
67
78LOGDIR=${SCRIPTDIR} /logs
89source $SCRIPTDIR /logging.sh
@@ -59,9 +60,9 @@ function create_factory_image() {
5960 " ${openshift_install} " --dir=" ${asset_dir} " --log-level=debug agent create unconfigured-ignition
6061 base_iso_url=$( oc adm release info --registry-config " $PULL_SECRET_FILE " --image-for=machine-os-images --insecure=true $OPENSHIFT_RELEASE_IMAGE )
6162 mkdir -p $HOME /.cache/agent/image_cache
62- oc image extract --path /coreos/coreos-$( uname -m ) .iso:$HOME /.cache/agent/image_cache --registry-config " $PULL_SECRET_FILE " --confirm $base_iso_url
63+ oc image extract --path /coreos/coreos-${ARCH} .iso:$HOME /.cache/agent/image_cache --registry-config " $PULL_SECRET_FILE " --confirm $base_iso_url
6364 local agent_iso_abs_path=" $( realpath " ${OCP_DIR} " ) "
64- podman run --pull=newer --privileged --rm -v /run/udev:/run/udev -v " ${agent_iso_abs_path} :${agent_iso_abs_path} " -v " $HOME /.cache/agent/image_cache/:$HOME /.cache/agent/image_cache/" quay.io/coreos/coreos-installer:release iso ignition embed -f -i " ${agent_iso_abs_path} /unconfigured-agent.ign" -o " ${agent_iso_abs_path} /agent.iso" $HOME /.cache/agent/image_cache/coreos-$( uname -m ) .iso
65+ podman run --pull=newer --privileged --rm -v /run/udev:/run/udev -v " ${agent_iso_abs_path} :${agent_iso_abs_path} " -v " $HOME /.cache/agent/image_cache/:$HOME /.cache/agent/image_cache/" quay.io/coreos/coreos-installer:release iso ignition embed -f -i " ${agent_iso_abs_path} /unconfigured-agent.ign" -o " ${agent_iso_abs_path} /agent.iso" $HOME /.cache/agent/image_cache/coreos-${ARCH} .iso
6566
6667 if [ " ${AGENT_APPLIANCE_HOTPLUG} " != true ]; then
6768 create_config_image
@@ -90,7 +91,13 @@ function create_agent_iso_no_registry() {
9091 local asset_dir=${1}
9192 pushd .
9293 cd $OPENSHIFT_AGENT_INSTALER_UTILS_PATH /tools/iso_builder
93- ./hack/build-ove-image.sh --pull-secret-file " ${PULL_SECRET_FILE} " --release-image-url " ${OPENSHIFT_RELEASE_IMAGE} " --ssh-key-file " ${SSH_KEY_FILE} " --dir " ${asset_dir} "
94+ # Build the ISO in the container image
95+ make build-ove-iso-container PULL_SECRET_FILE=" ${PULL_SECRET_FILE} " RELEASE_IMAGE_URL=" ${OPENSHIFT_RELEASE_IMAGE} " ARCH=${ARCH}
96+ # Retrieve ISO from container
97+ ./hack/iso-from-container.sh
98+ local iso_name=" agent-ove.${ARCH} .iso"
99+ echo " Moving ${iso_name} to ${asset_dir} "
100+ mv ./output-iso/${iso_name} " ${asset_dir} "
94101 popd
95102}
96103
@@ -147,7 +154,7 @@ function set_file_acl() {
147154}
148155
149156function get_agent_iso() {
150- local agent_iso=" ${OCP_DIR} /agent.$( uname -p ) .iso"
157+ local agent_iso=" ${OCP_DIR} /agent.${ARCH} .iso"
151158 if [ ! -f " ${agent_iso} " -a -f " ${OCP_DIR} /agent.iso" ]; then
152159 agent_iso=" ${OCP_DIR} /agent.iso"
153160 fi
@@ -156,7 +163,7 @@ function get_agent_iso() {
156163
157164function get_agent_iso_no_registry() {
158165 local base_dir=$SCRIPTDIR /$OCP_DIR
159- local iso_name=" agent-ove.$( uname -p ) .iso"
166+ local iso_name=" agent-ove.${ARCH} .iso"
160167 local agent_iso_no_registry=$( find " $base_dir " -type f -name " $iso_name " 2> /dev/null | head -n 1)
161168 if [ -z " $agent_iso_no_registry " ]; then
162169 echo " Error: No agent OVE ISO found matching ${iso_name} in ${base_dir} " >&2
@@ -289,7 +296,7 @@ function force_mirror_disconnect() {
289296}
290297
291298function disable_automated_installation() {
292- local agent_iso_abs_path=" $( realpath " ${OCP_DIR} /agent.$( uname -p ) .iso" ) "
299+ local agent_iso_abs_path=" $( realpath " ${OCP_DIR} /agent.${ARCH} .iso" ) "
293300 local ign_temp_path=" $( mktemp --directory) "
294301 _tmpfiles=" $_tmpfiles $ign_temp_path "
295302 echo " Extracting ISO ignition..."
0 commit comments