-
Notifications
You must be signed in to change notification settings - Fork 57
/
cloudbuild.yaml
47 lines (45 loc) · 1.88 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
steps:
#Clone the repository
- name: gcr.io/cloud-builders/git
args: ['clone', '--branch', 'tef_integration_baseline', 'https://source.developers.google.com/p/sa-test-gcp/r/tef-gcp-lz-gsr']
id: 'check-out-source'
- id: 'Install Tools and Perform Deployment'
name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args:
- -c
- |
gcloud auth application-default login --impersonate-service-account sa-gcp-partners-test@sa-test-gcp.iam.gserviceaccount.com --quiet
curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -
apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zip
unzip terraform_1.6.0_linux_amd64.zip
mv terraform /usr/local/bin/
chmod +x /usr/local/bin/terraform
terraform --version
apt-get update && apt-get install dos2unix
apt-get update && apt-get install google-cloud-sdk
apt-get install google-cloud-cli-terraform-tools -y
apt-get install jq -y
apt update && apt install python3 # Installs latest Python 3 version
ls -l
python3 ./fix_tfvars_symlinks.py .
find . -type f -name "*.sh" | xargs chmod a+x
find . -type f -name "*.sh" | xargs dos2unix
export SUPER_ADMIN_EMAIL=$_SUPER_ADMIN_EMAIL
export REGION=${_REGION}
export ORG_ID=${_ORG_ID}
export ROOT_FOLDER_ID=${_ROOT_FOLDER_ID}
export BILLING_ID=${_BILLING_ID}
export DOMAIN=${_DOMAIN}
echo ${_DOMAIN}
echo $_SUPER_ADMIN_EMAIL
echo ${_REGION}
echo ${_ORG_ID}
echo ${_ROOT_FOLDER_ID}
echo ${_BILLING_ID}
chmod +x automation-scripts/whole.sh
chmod +x ./0-bootstrap/prep.sh
sh ./automation-scripts/whole.sh
logsBucket: 'gs://tef-cb-logs-bucket/cloudbuild-logs'