forked from cirruslabs/vm-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
28 lines (24 loc) · 1.16 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
gcp_credentials: ENCRYPTED[1b5c33f6a4dad695c900754d08d5f69658be074ccde2b78e7958ea07d81d149cc9c15bab6be2d7fad6c1058a81c7cea3]
only_if: $CIRRUS_BRANCH == "master"
gce_instance:
image_project: cirrus-images
image_family: ubuntu-packer
zone: us-central1-b
cpu: 4
memory: 16Gb
scopes:
- compute
- devstorage.full_control
ubuntu_task:
version_script: packer --version
build_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -var 'gcp_project_id=cirrus-images' -var "current_date=$DATE" googlecompute/ubuntu_images.json
- gcloud compute images add-iam-policy-binding docker-builder-$DATE --member=allAuthenticatedUsers --role=roles/compute.imageUser
- gcloud compute images add-iam-policy-binding docker-kvm-$DATE --member=allAuthenticatedUsers --role=roles/compute.imageUser
windows_task:
version_script: packer --version
build_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -var 'gcp_project_id=cirrus-images' -var "current_date=$DATE" googlecompute/windows_images.json
- gcloud compute images add-iam-policy-binding windows-docker-builder-$DATE --member=allAuthenticatedUsers --role=roles/compute.imageUser