summaryrefslogtreecommitdiffstats
path: root/ci/create_glance_image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/create_glance_image.sh')
-rwxr-xr-xci/create_glance_image.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/ci/create_glance_image.sh b/ci/create_glance_image.sh
index e99de8c..9181a05 100755
--- a/ci/create_glance_image.sh
+++ b/ci/create_glance_image.sh
@@ -8,9 +8,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+cd "$(dirname "$0")" || exit
+mkdir -p job
+
ARCH="${ARCH:-$(uname -m)}"
-IMAGE_NAME="Ubuntu 16.04 ${ARCH}"
+IMAGE_NAME="Ubuntu 17.04 ${ARCH}"
echo "Checking for ${IMAGE_NAME} in Glance"
@@ -21,14 +24,14 @@ then
case "${ARCH}" in
aarch64)
- FILE=ubuntu-16.04-server-cloudimg-arm64-uefi1.img
+ FILE=ubuntu-17.04-server-cloudimg-arm64.img
PROPERTIES="--property hw_firmware_type=uefi --property hw_video_model=vga"
;;
armhf)
- FILE=ubuntu-16.04-server-cloudimg-armhf-disk1.img
+ FILE=ubuntu-17.04-server-cloudimg-armhf.img
;;
x86_64)
- FILE=ubuntu-16.04-server-cloudimg-amd64-disk1.img
+ FILE=ubuntu-17.04-server-cloudimg-amd64.img
;;
*)
echo "Unsupported architecture: ${ARCH}"
@@ -36,10 +39,12 @@ then
;;
esac
- wget --continue -q "https://cloud-images.ubuntu.com/releases/16.04/release/${FILE}"
+ wget --continue -q "https://cloud-images.ubuntu.com/releases/17.04/release/${FILE}"
openstack image create "${IMAGE_NAME}" --disk-format qcow2 --public \
${PROPERTIES} \
--container-format bare --file "${FILE}"
fi
openstack image show "${IMAGE_NAME}"
+
+echo "${IMAGE_NAME}" > job/glance_image_name