forked from stargate/stargate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
96 lines (95 loc) · 2.91 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
steps:
- id: 'pull image'
name: 'gcr.io/stargateio/stargate-builder:v1.0.3'
entrypoint: 'bash'
args: [ '-c', 'echo pulled builder' ]
- id: 'fetch_secret'
waitFor: [ '-' ]
name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args: [ '-c', "gcloud secrets versions access latest --secret=stargate-artifactory --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/ci/custom-settings.xml" ]
- id: 'fetch codacy secret'
waitFor: [ '-' ]
name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args: [ '-c', "gcloud secrets versions access latest --secret=codacy-project-token --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/ci/codacy-project-token" ]
- id: 'init_cache'
name: 'gcr.io/cloud-builders/gsutil'
waitFor: [ '-' ]
args:
- '-m'
- 'rsync'
- '-r'
- '-x'
- '^.*io/stargate.*$'
- 'gs://${_BUCKET}/cache/.m2'
- '/cache/.m2'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
- id: 'build'
name: 'maven:3-jdk-8'
waitFor: [ 'fetch_secret', 'init_cache' ]
entrypoint: mvn
args: [ '-B','install', '--settings', 'ci/custom-settings.xml', '--file', 'pom.xml', '-DskipITs',
'-Dmaven.javadoc.skip=true', '-Pdse', '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
]
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- 'MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2'
- id: 'dse-6.8'
waitFor: [ 'build' ]
name: 'gcr.io/stargateio/stargate-builder:v1.0.3'
entrypoint: 'bash'
args: [ 'ci/test.sh' ]
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- 'MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2'
- 'PERSISTENCE_BACKEND=dse-6.8'
- 'COMMIT_ID=$COMMIT_SHA'
- id: 'cassandra-3.11'
waitFor: [ 'dse-6.8' ]
name: 'gcr.io/stargateio/stargate-builder:v1.0.3'
entrypoint: 'bash'
args: [ 'ci/test.sh' ]
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- 'MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2'
- 'PERSISTENCE_BACKEND=cassandra-3.11'
- 'COMMIT_ID=$COMMIT_SHA'
- id: 'cassandra-4.0'
waitFor: [ 'cassandra-3.11' ]
name: 'gcr.io/stargateio/stargate-builder:v1.0.3'
entrypoint: 'bash'
args: [ 'ci/test.sh' ]
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
env:
- 'MAVEN_OPTS=-Dmaven.repo.local=/cache/.m2'
- 'PERSISTENCE_BACKEND=cassandra-4.0'
- 'COMMIT_ID=$COMMIT_SHA'
- name: 'gcr.io/cloud-builders/gsutil'
waitFor: [ 'cassandra-4.0' ]
args:
- '-m'
- 'rsync'
- '-r'
- '-x'
- '^.*io/stargate.*$'
- '/cache/.m2'
- 'gs://${_BUCKET}/cache/.m2/'
volumes:
- path: '/cache/.m2'
name: 'm2_cache'
substitutions:
_BUCKET: 'stargateio-github_cloudbuild'
timeout: 14400s
options:
machineType: 'N1_HIGHCPU_32'