Makefile.gce (285049) | Makefile.gce (303917) |
---|---|
1# | 1# |
2# $FreeBSD: stable/10/release/Makefile.gce 285049 2015-07-02 16:17:05Z gjb $ | 2# $FreeBSD: stable/10/release/Makefile.gce 303917 2016-08-10 14:00:07Z gjb $ |
3# 4# 5# Makefile for uploading Google Compute Engine disk images. 6# 7 8GCE_IMG?= ${.OBJDIR}/gce.raw 9GCE_UPLOAD_TGTS= gce-check-depends \ 10 gce-do-package \ --- 19 unchanged lines hidden (view full) --- 30 31gce-check-depends: 32.for VAR in _BUCKET 33. if !defined(GCE${VAR}) || empty(GCE${VAR}) 34 @echo "Variable GCE${VAR} cannot be empty." 35 @false 36. endif 37.endfor | 3# 4# 5# Makefile for uploading Google Compute Engine disk images. 6# 7 8GCE_IMG?= ${.OBJDIR}/gce.raw 9GCE_UPLOAD_TGTS= gce-check-depends \ 10 gce-do-package \ --- 19 unchanged lines hidden (view full) --- 30 31gce-check-depends: 32.for VAR in _BUCKET 33. if !defined(GCE${VAR}) || empty(GCE${VAR}) 34 @echo "Variable GCE${VAR} cannot be empty." 35 @false 36. endif 37.endfor |
38.if !exists(/usr/local/bin/gcutil) | 38.if !exists(/usr/local/bin/gcloud) |
39. if !exists(${PORTSDIR}/net/google-cloud-sdk/Makefile) 40. if !exists(/usr/local/sbin/pkg-static) 41 env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf 42. endif 43 env ASSUME_ALWAYS_YES=yes pkg install -y net/google-cloud-sdk 44. else 45 make -C ${PORTSDIR}/net/google-cloud-sdk BATCH=1 all install clean 46. endif --- 11 unchanged lines hidden (view full) --- 58 @echo "This requires human interaction, which is not yet supported." 59 @true 60 61gce-do-upload: 62 @# Fallthrough in case the bucket already exists. 63 /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true 64 /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ 65 gs://${GCE_BUCKET}/ | 39. if !exists(${PORTSDIR}/net/google-cloud-sdk/Makefile) 40. if !exists(/usr/local/sbin/pkg-static) 41 env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf 42. endif 43 env ASSUME_ALWAYS_YES=yes pkg install -y net/google-cloud-sdk 44. else 45 make -C ${PORTSDIR}/net/google-cloud-sdk BATCH=1 all install clean 46. endif --- 11 unchanged lines hidden (view full) --- 58 @echo "This requires human interaction, which is not yet supported." 59 @true 60 61gce-do-upload: 62 @# Fallthrough in case the bucket already exists. 63 /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true 64 /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ 65 gs://${GCE_BUCKET}/ |
66 /usr/local/bin/gcutil addimage ${GCE_TARGET} \ 67 gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz | 66 /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ 67 --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz |
68 touch ${.OBJDIR}/${.TARGET} 69 | 68 touch ${.OBJDIR}/${.TARGET} 69 |