-
Notifications
You must be signed in to change notification settings - Fork 3
/
cloudbuild.yaml
53 lines (53 loc) · 1.54 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
steps:
- name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args: [ '-c', "gcloud secrets versions access latest --secret=acceptance_api_jks --format='get(payload.data)' | tr '_-' '/+' | base64 -d > cluster/api.jks" ]
- name: 'maven:3-jdk-11'
id: 'Set version for Maven'
entrypoint: mvn
args: [ 'versions:set', '-DnewVersion=${TAG_NAME}' ]
- name: 'gcr.io/cloud-builders/gsutil'
id: 'Prime Maven cache'
args:
- '-m'
- 'rsync'
- '-r'
- 'gs://hmf-build-caches/pipeline5/.m2'
- '/cache/.m2'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
- name: hartwigmedicalfoundation/docker-mvn-gcloud:3-jdk-11
id: 'Deploy artifacts to Maven repository'
entrypoint: mvn
timeout: 3600s
args:
- 'deploy'
- '-Drelease'
- '--batch-mode'
env:
- MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
- name: 'gcr.io/cloud-builders/gsutil'
id: 'Update Maven cache after dependency resolution'
args:
- '-m'
- 'rsync'
- '-r'
- '/cache/.m2'
- 'gs://hmf-build-caches/pipeline5/.m2/'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
- name: 'eu.gcr.io/hmf-build/docker-tag'
id: 'Publish Docker image'
dir: cluster
args: ['eu.gcr.io/hmf-build/pipeline5', '$TAG_NAME', 'Dockerfile', '--build-arg', 'VERSION=$TAG_NAME']
images:
- eu.gcr.io/hmf-build/pipeline5
logsBucket: 'gs://hmf-build-logs'
timeout: 4800s
options:
machineType: 'E2_HIGHCPU_32'