Skip to content

Commit

Permalink
Fix installer problems in ci (vmware#1726) (vmware#1832)
Browse files Browse the repository at this point in the history
Slightly increases the disk size of the ova during the
installer build process. Fixes a syntax error during the
manifest generation and removes target disk loops
during disk export. Fixes vmware#1725.

(cherry picked from commit 7a3d847)
  • Loading branch information
Jason Morris authored and zjs committed Jun 23, 2018
1 parent b8d7202 commit f52b38e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions installer/build/bootable/build-disks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ fi

# These sizes are minimal for install, since partitions are resized to full disk space after firstboot.
IMAGESIZES=(
"4GiB"
"1GiB"
"6GiB"
"2GiB"
)
IMAGES=(
"vic-disk1"
Expand Down Expand Up @@ -207,7 +207,8 @@ elif [ "${ACTION}" == "export" ]; then
log1 "export images to VMDKs"
for i in "${!IMAGES[@]}"; do
log2 "exporting ${IMAGES[$i]}.img to ${IMAGES[$i]}.vmdk"
DEV=$(losetup -l -O NAME,BACK-FILE -a | tail -n +2 | grep "${IMAGES[$i]}" | awk '{print $1}')
echo "export ${PACKAGE}/${IMAGES[$i]}"
DEV=$(losetup -l -O NAME,BACK-FILE -a | tail -n +2 | grep "${PACKAGE}/${IMAGES[$i]}" | awk '{print $1}')
convert "${DEV}" "${IMAGEROOTS[$i]}" "${IMAGES[$i]}.img" "${IMAGES[$i]}.vmdk"
done

Expand Down
2 changes: 1 addition & 1 deletion installer/build/bootable/build-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function main {
cd "${PACKAGE}"
sed -i -e s~--version--~${BUILD_OVA_REVISION}~ vic-${BUILD_OVA_REVISION}.ovf
log2 "rebuilding OVF manifest"
sha256sum --tag "vic-${BUILD_OVA_REVISION}.ovf" "vic-${BUILD_OVA_REVISION}.mf" *.vmdk | sed s/SHA256\ \(/SHA256\(/ > "vic-${BUILD_OVA_REVISION}.mf"
sha256sum --tag "vic-${BUILD_OVA_REVISION}.ovf" *.vmdk | sed s/SHA256\ \(/SHA256\(/ > "vic-${BUILD_OVA_REVISION}.mf"
tar -cvf "${RESOURCE}/vic-${BUILD_OVA_REVISION}.ova" "vic-${BUILD_OVA_REVISION}.ovf" "vic-${BUILD_OVA_REVISION}.mf" *.vmdk

OUTFILE=${RESOURCE}/vic-${BUILD_OVA_REVISION}.ova
Expand Down

0 comments on commit f52b38e

Please sign in to comment.