forked from lagom/lagom-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
185 lines (164 loc) · 7.55 KB
/
.travis.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
language: scala
# Only build non-pushes (so PRs, API requests & cron jobs) OR main branch builds
# https://docs.travis-ci.com/user/conditional-builds-stages-jobs/
if: type != push OR branch IN (1.5.x, 1.6.x)
before_install:
# See https://github.com/travis-ci/travis-ci/issues/4629#issuecomment-239493916
- rm ~/.m2/settings.xml
- . bin/jabbaLib && installJabba
services:
# shopping cart is using postgres for testing
- postgresql
jobs:
include:
- stage: test
script:
- useAdoptOpenJdk8
- "bin/runSbtJob mixed-persistence/mixed-persistence-java-sbt test"
name: "Run tests Mixed Persistence (java)"
- script:
- useAdoptOpenJdk8
- "bin/runSbtJob mixed-persistence/mixed-persistence-scala-sbt test"
name: "Run tests Mixed Persistence (scala)"
- script:
- useAdoptOpenJdk8
- "bin/runSbtJob grpc-example/grpc-example-java test"
name: "Run tests gRPC example (java)"
- script:
- useAdoptOpenJdk8
- "bin/runSbtJob grpc-example/grpc-example-scala test"
name: "Run tests gRPC example (scala)"
- script:
- useAdoptOpenJdk8
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-java sbt"
name: "Run tests Shopping Cart example (java/sbt)"
- script:
- useAdoptOpenJdk8
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-java maven"
name: "Run tests Shopping Cart example (java/mvn)"
- script:
- useAdoptOpenJdk8
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-scala sbt"
name: "Run tests Shopping Cart example (scala)"
- script:
- docker-compose -f couchbase-persistence/docker/docker-compose.yml up -d couchbase
- sleep 30s
- useAdoptOpenJdk8
- mvn -f couchbase-persistence/couchbase-persistence-java-mvn test
name: "Run tests Couchbase Persistence (java)"
- script:
- docker-compose -f couchbase-persistence/docker/docker-compose.yml up -d couchbase
- sleep 30s
- useAdoptOpenJdk8
- "bin/runSbtJob couchbase-persistence/couchbase-persistence-scala-sbt test"
name: "Run tests Couchbase Persistence (scala)"
- stage: test-java11
script:
- useAdoptOpenJdk11
- "bin/runSbtJob mixed-persistence/mixed-persistence-java-sbt test"
name: "Run tests Mixed Persistence (java)"
- script:
- useAdoptOpenJdk11
- "bin/runSbtJob mixed-persistence/mixed-persistence-scala-sbt test"
name: "Run tests Mixed Persistence (scala)"
- script:
- useAdoptOpenJdk11
- "bin/runSbtJob grpc-example/grpc-example-java test"
name: "Run tests gRPC example (java)"
- script:
- useAdoptOpenJdk11
- "bin/runSbtJob grpc-example/grpc-example-scala test"
name: "Run tests gRPC example (scala)"
- script:
- useAdoptOpenJdk11
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-java sbt"
name: "Run tests Shopping Cart example (java/sbt)"
- script:
- useAdoptOpenJdk11
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-java maven"
name: "Run tests Shopping Cart example (java/mvn)"
- script:
- useAdoptOpenJdk11
- "shopping-cart/travis-scripts/build.sh shopping-cart/shopping-cart-scala sbt"
name: "Run tests Shopping Cart example (scala)"
- script:
- docker-compose -f couchbase-persistence/docker/docker-compose.yml up -d couchbase
- sleep 30s
- useAdoptOpenJdk11
- mvn -f couchbase-persistence/couchbase-persistence-java-mvn test
name: "Run tests Couchbase Persistence (java)"
- script:
- docker-compose -f couchbase-persistence/docker/docker-compose.yml up -d couchbase
- sleep 30s
- useAdoptOpenJdk11
- "bin/runSbtJob couchbase-persistence/couchbase-persistence-scala-sbt test"
name: "Run tests Couchbase Persistence (scala)"
- stage: deploy
script:
- useAdoptOpenJdk8
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-scala sbt
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-scala sbt
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-scala sbt
name: "Deploy Shopping Cart example (scala/sbt)"
- script:
- useAdoptOpenJdk8
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-java sbt
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-java sbt
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-java sbt
name: "Deploy Shopping Cart example (java/sbt)"
- script:
- useAdoptOpenJdk8
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-java maven
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-java maven
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-java maven
name: "Deploy Shopping Cart example (java/maven)"
- stage: deploy-java11
script:
- useAdoptOpenJdk11
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-scala sbt
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-scala sbt
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-scala sbt
name: "Deploy Shopping Cart example (scala/sbt)"
- script:
- useAdoptOpenJdk11
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-java sbt
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-java sbt
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-java sbt
name: "Deploy Shopping Cart example (java/sbt)"
- script:
- useAdoptOpenJdk11
- shopping-cart/deploy/scripts/deploy-shopping-cart.sh shopping-cart-java maven
- shopping-cart/deploy/scripts/test-shopping-cart.sh shopping-cart-java maven
- shopping-cart/deploy/scripts/delete-shopping-cart.sh shopping-cart-java maven
name: "Deploy Shopping Cart example (java/maven)"
stages:
- test
- test-java11
- name: deploy
if: env(CP2_PLAY_PASSWORD) IS present # only run the "deploy" stage if the password is present
- name: deploy-java11
if: env(CP2_PLAY_PASSWORD) IS present # only run the "deploy" stage if the password is present
env:
global:
# Following secret is for CP2_PLAY_PASSWORD (password of the 'play-team' user in centralpark2 cluster)
# The secret was created for the repo 'lagom/lagom-ssamples' using
# $ travis encrypt --com CP2_PLAY_PASSWORD="asdf-qwer-1234-..."
# !!NOTE: the use of `--com` is required because the lagom org in travis uses travis-ci.com (not travis-ci.org)
# See https://docs.travis-ci.com/user/encryption-keys/
secure: "Z7UAwHr8aVoFbhpE7wJHrP2yy/q33aNdKEiJdS7vO2xTPVedG/NWPFXfvpCliaKGwl6L9zDGEh0EaX7KgYuQ5C2uXjoEluv40Iyc+6qyA/yyMHT/ofBIuWl3Oo5jf4NZFXLUYSu5m9TWguuB0+xm6bJVa0USFK0frmazrWUjaAcXrvQ2tKyHi74ZpNCoVIKrrs/CdsBhAMApDjMPAxVQogcq6uT2Fe/oBKP8PuU1U8tNEJ/TXaWBKWRqjhLOq7pzuU19+oJD7R3T3Rs/NiHZq8WqR8ZvhrWsHWD5BUOIQ4Y+5Yp+K0PYkpYWPK5kYWxbtDPMNz/Af5fMG5oEiaPPvH6nPnNODpEW9T8BDjGHvTGPc1/upuDg3DHqbXaxF1u1/Zyfn6UW8K/iQvu5c3NznXvgLqGAz2HEjdmFr4DALBoxmNA3jheXg7GME5Dtus7qgBAKl+qu/N0AfPozl9TSvsjX5uJkzUOL2FYyqMB1Wv8QQOfGC7wfteX5K/pxL8obf9lKarZufdIr/DjPrR5Hj6ZgypmKnPEDur8peAprZvw9IFSXCcTtYXHGAdkuqOTFXKyrNlDv8r5f63JMYutJ382345M9Yhe/1wilFfEXrqMOyR8lj3QT0uIg42W2bCzYKNY+ZTsLeqIowTfJyIZoyZvfl3yk4rbs+58EGYzVw2c="
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.jabba/jdk
- $HOME/.m2/repository
- $HOME/.sbt
before_cache:
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/2aa0aeda88d31fe293d4
on_success: change
on_failure: always
on_start: never