-
Notifications
You must be signed in to change notification settings - Fork 207
/
cloudbuild-binaries.yaml
62 lines (62 loc) · 2.13 KB
/
cloudbuild-binaries.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
54
55
56
57
58
59
60
61
62
# See ./Dockerfile.binaries for more information w.r.t this CI flow
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- '-c'
- 'docker pull us.gcr.io/$PROJECT_ID/geth-xgo-builder:latest || exit 0'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- '-c'
- 'docker build .
--cache-from us.gcr.io/$PROJECT_ID/geth-xgo-builder:latest
-t us.gcr.io/$PROJECT_ID/geth-xgo-builder:$COMMIT_SHA
-t us.gcr.io/$PROJECT_ID/geth-xgo-builder:latest
-f Dockerfile.binaries'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- '-c'
- 'docker run --rm
-v $(pwd)/build/bin:/build
-v $(pwd)/build/archives:/archives
-v $(pwd):/go/src/github.com/celo-org/celo-blockchain
--entrypoint /bin/sh
--env BUILD_TARGETS=$_BUILD_TARGETS
--env TAG_NAME=$TAG_NAME
--env BRANCH_NAME=$BRANCH_NAME
--env REPO_NAME=$REPO_NAME
--env COMMIT_SHA=$COMMIT_SHA
--env COMMIT_TIMESTAMP=$(date +%s)
--env CLOUDBUILD=True
--env CI=True
us.gcr.io/$PROJECT_ID/geth-xgo-builder:$COMMIT_SHA
-c "go run build/ci.go xgo --alltools -- -targets=$_BUILD_TARGETS -v -dest /build"'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- '-c'
- 'docker run --rm
-v $(pwd)/build/bin:/build
-v $(pwd)/build/archives:/archives
-v $(pwd):/go/src/github.com/celo-org/celo-blockchain
--entrypoint /bin/sh
--env BUILD_TARGETS=$_BUILD_TARGETS
--env TAG_NAME=$TAG_NAME
--env BRANCH_NAME=$BRANCH_NAME
--env REPO_NAME=$REPO_NAME
--env COMMIT_SHA=$COMMIT_SHA
--env COMMIT_TIMESTAMP=$(date +%s)
--env CLOUDBUILD=True
--env CI=True
us.gcr.io/$PROJECT_ID/geth-xgo-builder:$COMMIT_SHA
-c "go run build/ci.go xgo-archive -targets=$_BUILD_TARGETS -in /build -out /archives"'
artifacts:
objects:
location: 'gs://$_BUCKET/$BRANCH_NAME/'
paths: ['./build/archives/*']
images:
- 'us.gcr.io/$PROJECT_ID/geth-xgo-builder:$COMMIT_SHA'
- 'us.gcr.io/$PROJECT_ID/geth-xgo-builder:latest'
timeout: 2700s