aboutsummaryrefslogtreecommitdiff
path: root/push.sh
diff options
context:
space:
mode:
authorJeremy Edwards <jeremyje@gmail.com>2015-12-03 15:43:43 -0800
committerJeremy Edwards <jeremyje@gmail.com>2015-12-03 15:43:43 -0800
commit52521dc682d675cb19bea34c5fdd64fdd3a37934 (patch)
tree68cef5080cc07f7718edc51eb23947ea2e3d8f45 /push.sh
parent8bc317d4e12d780f00d04e5e776b55a59614a70d (diff)
downloadcompute-archlinux-image-builder-52521dc682d675cb19bea34c5fdd64fdd3a37934.tar.xz
Update builder to reflect changes to Arch build process.
Diffstat (limited to 'push.sh')
-rwxr-xr-xpush.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/push.sh b/push.sh
new file mode 100755
index 0000000..7faa2dc
--- /dev/null
+++ b/push.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+
+VM_USER="${USER}"
+PACKAGE_FILE="archbuilder.tar.gz"
+INSTANCE_NAME="instance-1"
+ZONE="us-east1-d"
+ARCH_DATE="20151023"
+SSH_TARGET=${VM_USER}@${INSTANCE_NAME}
+
+rm -f ${PACKAGE_FILE}
+tar czf ${PACKAGE_FILE} *
+gcloud compute ssh ${SSH_TARGET} --command "rm -fr *" --zone=${ZONE}
+gcloud compute copy-files ${PACKAGE_FILE} ${SSH_TARGET}:/home/${VM_USER} --zone=${ZONE}
+
+gcloud compute ssh ${SSH_TARGET} --command "tar xvzf ${PACKAGE_FILE}; rm ${PACKAGE_FILE}; chmod +x *.sh" --zone=${ZONE}
+gcloud compute ssh ${SSH_TARGET} --command "sudo ./build-gce-arch.py --verbose --size_gb=100 --debug --public --upload gs://jeremyje/archlinux-images/arch-v${ARCH_DATE}.tar.gz --register" --zone=${ZONE}