forked from GoogleCloudPlatform/marketplace-vm-imagebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
49 lines (44 loc) · 1.25 KB
/
cloudbuild.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
timeout: 600s
options:
workerPool: projects/${PROJECT_ID}/locations/us-central1/workerPools/gcb-workers-pool-e2
steps:
- id: Build imagebuilder
name: gcr.io/cloud-builders/docker
args:
- build
- --tag=imagebuilder
- .
- id: Build sample-app
name: gcr.io/cloud-builders/docker
waitFor:
- Build imagebuilder
args:
- run
- --env=PROJECT=${PROJECT_ID}
- --env=BUCKET=${_LOGS_BUCKET}
- --env=SOLUTION_NAME=sample-app
- --env=RUN_TESTS=true
- --env=ATTACH_LICENSE=true
- --env=LICENSE_PROJECT_NAME=${PROJECT_ID}
- --env=USE_INTERNAL_IP=true
- --env=SERVICE_ACCOUNT_EMAIL=cloud-marketplace-ops-test-rel@cloud-marketplace-ops-test.iam.gserviceaccount.com
- --volume=/workspace/examples/chef:/chef:ro
- --volume=/workspace/examples/packer:/packer:ro
- --volume=/workspace/examples/tests:/tests:ro
- --network=cloudbuild
- imagebuilder
- id: Add latest Tag
name: gcr.io/cloud-builders/docker
args:
- tag
- imagebuilder
- gcr.io/${PROJECT_ID}/vm/imagebuilder:latest
- id: Add COMMIT_SHA Tag
name: gcr.io/cloud-builders/docker
args:
- tag
- imagebuilder
- gcr.io/${PROJECT_ID}/vm/imagebuilder:sha_${COMMIT_SHA}
images:
- gcr.io/${PROJECT_ID}/vm/imagebuilder:latest
- gcr.io/${PROJECT_ID}/vm/imagebuilder:sha_${COMMIT_SHA}