-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathcloudbuild.yaml
54 lines (49 loc) · 1.26 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
steps:
- name: 'gcr.io/cloud-builders/gsutil'
id: 'Populating Maven cache from bucket'
args:
- '-m'
- 'rsync'
- '-r'
- 'gs://hmf-build-caches/hmftools/.m2'
- '/cache/.m2'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
- name: 'maven:3-jdk-11'
id: 'Setting version for Maven'
entrypoint: mvn
args: [ 'versions:set', '-DnewVersion=${TAG_NAME}' ]
- name: 'maven:3-jdk-11'
id: 'Deploying parent pom to Maven'
entrypoint: mvn
args: [ 'deploy', '-B', '-N' ]
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2
- name: 'maven:3-jdk-11'
id: 'Deploying orange-datamodel to Maven'
entrypoint: mvn
args: [ 'deploy', '-B', '-Pshade' ]
dir: 'orange-datamodel'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2
- name: 'gcr.io/cloud-builders/gsutil'
id: 'Refreshing bucket from local Maven cache after build'
args:
- '-m'
- 'rsync'
- '-r'
- '/cache/.m2'
- 'gs://hmf-build-caches/hmftools/.m2/'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
timeout: 4800s
options:
machineType: 'E2_HIGHCPU_8'