forked from pinterest/secor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.yaml
61 lines (56 loc) · 1.51 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
54
55
56
57
58
59
60
61
steps:
- name: 'gcr.io/cloud-builders/gsutil'
entrypoint: bash
args: ['ci/cloudbuild/gcp-dependencies']
volumes:
- path: /root/.m2/repository
name: m2_cache
env:
- 'REPO_NAME=$REPO_NAME'
- 'BRANCH_NAME=$BRANCH_NAME'
- '_CACHE_BUCKET=${_CACHE_BUCKET}'
- '_M2_LOCAL_REPOSITORY=${_M2_LOCAL_REPOSITORY}'
waitFor: ['-']
- name: maven:3-jdk-8
volumes:
- path: /root/.m2/repository
name: m2_cache
args: [
"mvn",
"org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline",
"org.apache.maven.plugins:maven-dependency-plugin:3.1.1:resolve-plugins"
]
- name: maven:3-jdk-8
volumes:
- path: /root/.m2/repository
name: m2_cache
args: [
"mvn",
"--batch-mode",
"package",
"-P", "kafka-0.11-1.0.0"
]
- name: gcr.io/cloud-builders/docker
args:
- "build"
- "--cache-from"
- "us.gcr.io/${PROJECT_ID}/secor:latest"
- "-t"
- "us.gcr.io/${PROJECT_ID}/secor:${COMMIT_SHA}"
- "-t"
- "us.gcr.io/${PROJECT_ID}/secor:latest"
- "."
- name: 'gcr.io/cloud-builders/gsutil'
entrypoint: bash
args: ['ci/cloudbuild/gcp-save-dependencies']
volumes:
- path: /root/.m2/repository
name: m2_cache
env:
- 'REPO_NAME=$REPO_NAME'
- 'BRANCH_NAME=$BRANCH_NAME'
- '_CACHE_BUCKET=${_CACHE_BUCKET}'
- '_M2_LOCAL_REPOSITORY=${_M2_LOCAL_REPOSITORY}'
timeout: 1200s
images:
- "us.gcr.io/${PROJECT_ID}/secor"