forked from graphprotocol/graph-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
53 lines (53 loc) · 2.18 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
50
51
52
53
options:
machineType: "N1_HIGHCPU_32"
timeout: 1800s
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--target', 'graph-node-build',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'REPO_NAME=$REPO_NAME',
'--build-arg', 'BRANCH_NAME=$BRANCH_NAME',
'--build-arg', 'TAG_NAME=$TAG_NAME',
'-t', 'gcr.io/$PROJECT_ID/graph-node-build:$SHORT_SHA',
'-f', 'docker/Dockerfile', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--target', 'graph-node',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'REPO_NAME=$REPO_NAME',
'--build-arg', 'BRANCH_NAME=$BRANCH_NAME',
'--build-arg', 'TAG_NAME=$TAG_NAME',
'-t', 'gcr.io/$PROJECT_ID/graph-node:$SHORT_SHA',
'-f', 'docker/Dockerfile', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--target', 'graph-node-debug',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'REPO_NAME=$REPO_NAME',
'--build-arg', 'BRANCH_NAME=$BRANCH_NAME',
'--build-arg', 'TAG_NAME=$TAG_NAME',
'-t', 'gcr.io/$PROJECT_ID/graph-node-debug:$SHORT_SHA',
'-f', 'docker/Dockerfile', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag',
'gcr.io/$PROJECT_ID/graph-node:$SHORT_SHA',
'lutter/graph-node:$SHORT_SHA']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['docker/tag.sh']
secretEnv: ['PASSWORD']
env:
- 'SHORT_SHA=$SHORT_SHA'
- 'TAG_NAME=$TAG_NAME'
- 'PROJECT_ID=$PROJECT_ID'
- 'DOCKER_HUB_USER=$_DOCKER_HUB_USER'
- 'BRANCH_NAME=$BRANCH_NAME'
images:
- 'gcr.io/$PROJECT_ID/graph-node-build:$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/graph-node:$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/graph-node-debug:$SHORT_SHA'
substitutions:
# The owner of the access token whose encrypted value is in PASSWORD
_DOCKER_HUB_USER: "lutter"
secrets:
- kmsKeyName: projects/the-graph-staging/locations/global/keyRings/docker/cryptoKeys/docker-hub-push
secretEnv:
PASSWORD: 'CiQAdfFldbmUiHgGP1lPq6bAOfd+VQ/dFwyohB1IQwiwQg03ZE8STQDvWKpv6eJHVUN1YoFC5FcooJrH+Stvx9oMD7jBjgxEH5ngIiAysWP3E4Pgxt/73xnaanbM1EQ94eVFKCiY0GaEKFNu0BJx22vCYmU4'