-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.cirrus.yml
34 lines (31 loc) · 1.69 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
29
30
31
32
33
34
gcp_credentials: ENCRYPTED[908f33fc87dc9f6d4cf978f0aa853d807a48885b8f90e46c5b21380673459098c0a84c094c38b2ab777cdb97c8c2e3dc]
only_if: $CIRRUS_BRANCH == "master"
timeout_in: 2h
gce_instance:
image_project: cirrus-images
image_family: docker-builder
zone: us-central1-b
cpu: 4
memory: 16Gb
scopes:
- cloud-platform
- compute
- devstorage.full_control
ubuntu_task:
version_script: packer --version
build_docker_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -only=docker -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
build_docker_arm64_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -only=docker-arm64 -var 'gcp_project_id=cirrus-images' -var "current_date=$DATE" googlecompute/ubuntu_images.json
- gcloud compute images add-iam-policy-binding docker-builder-$DATE-arm64 --member=allAuthenticatedUsers --role=roles/compute.imageUser
build_kvm_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -only=kvm -var 'gcp_project_id=cirrus-images' -var "current_date=$DATE" googlecompute/ubuntu_images.json
- gcloud compute images add-iam-policy-binding docker-kvm-$DATE --member=allAuthenticatedUsers --role=roles/compute.imageUser
packer_script:
- export DATE=$(date +'%Y%m%d')
- packer build -force -only=packer -var 'gcp_project_id=cirrus-images' -var "current_date=$DATE" googlecompute/ubuntu_images.json
- gcloud compute images add-iam-policy-binding docker-packer-$DATE --member=allAuthenticatedUsers --role=roles/compute.imageUser