forked from liquid-labs/liq-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
47 lines (44 loc) · 1.03 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
# decrypt the 'deploy key'
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- kms
- decrypt
- --ciphertext-file=cicd/github_cloud_build_rsa.gcloud-enc
- --plaintext-file=/root/.ssh/id_rsa
- --location=global
- --keyring=my-keyring
- --key=github-key
volumes:
- name: 'ssh'
path: /root/.ssh
# Set up git with key and domain
- name: 'gcr.io/cloud-builders/git'
entrypoint: 'bash'
args:
- '-c'
- |
chmod 600 /root/.ssh/id_rsa
cat <<EOF >/root/.ssh/config
Host github.com
Hostname github.com
IdentityFile /root/.ssh/id_rsa
EOF
chmod 600 /root/.ssh/config
mv cicd/known_hosts /root/.ssh/known_hosts
git config --global user.email "[email protected]"
git config --global user.name "Testy Test"
volumes:
- name: 'ssh'
path: /root/.ssh
- name: 'gcr.io/liquid-cli/test-base'
args: ['install', '--unsafe-perm']
env:
- 'TERM=xterm'
- name: 'gcr.io/liquid-cli/test-base'
args: ['run', 'test']
env:
- 'TERM=xterm'
volumes:
- name: 'ssh'
path: /root/.ssh