-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
29 lines (28 loc) · 1.39 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
# Timeout after 10h. Today, there are around 50 virtual machines in the
# production cluster. On average it takes a single VM around 6.5m to be
# deleted, recreated, and for ndt-server or the API to be available. If we
# update the machines serially, this means a total build time of around 5.5
# hours. Set the timeout to around double that just for room to grow.
timeout: 36000s
# We have $_IMAGE_PROJECT in a Cloud Build user-defined substitution variable
# because this build gets run in more projects that just the standard
# sandbox->staging->prod, but those projects are the only ones where the
# container images are built and pushed to Artifact Registry. The other
# production projects where this build will happen are "mlab-autojoin" and
# "measurement-lab", which are production projects, so we want to use the
# "mlab-oti" (production) image. The value of this variable is defined in the
# build trigger of each project.
steps:
- name: us-central1-docker.pkg.dev/${_IMAGE_PROJECT}/build-images/gcloud-jsonnet-cbif:1.1
entrypoint: /bin/bash
args:
- -c
- |-
export TF_RELEASE="1.7.4"
apt update
apt install --yes unzip
curl --remote-name https://releases.hashicorp.com/terraform/$${TF_RELEASE}/terraform_$${TF_RELEASE}_linux_amd64.zip
unzip terraform_$${TF_RELEASE}_linux_amd64.zip
mv terraform /usr/local/bin/
export PROJECT=$PROJECT_ID
bash scripts/tf_apply.sh $$PROJECT