forked from cloudfoundry/uaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
199 lines (194 loc) · 6.19 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
env:
global:
- secure: Ubdyw9qc/AVX61ZTehLm90NG5q+qCIPljY5nYNmmkjvNKRIpx1bYIDjFflfXbSKn+opqBdpo5qQJwLQwO1xCvWfDsAO9YlriiqIZQuYXynAqe0hCqKkMn7OqTDR+rZuA+jl7t7LVwWhwbQ4+IiAC44d6CKIa1WPhmgy5dHxBKac=
matrix:
include:
- os: linux
dist: trusty
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=default
- TEST_COMMAND=generateDocs
- os: linux
dist: trusty
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=sqlserver,default
- TEST_COMMAND=cloudfoundry-identity-server:test
- os: linux
dist: trusty
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=sqlserver,default
- TEST_COMMAND=cloudfoundry-identity-uaa:test
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
services:
- mysql
env:
- TESTENV=mysql,default
- TEST_COMMAND=jacocoRootReportTest
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
services:
- postgresql
env:
- TESTENV=postgresql,default
- TEST_COMMAND=jacocoRootReportTest
- os: linux
dist: trusty
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=ldap,default
- TEST_COMMAND=jacocoRootReportTest
- os: linux
dist: trusty
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=default
- TEST_COMMAND=jacocoRootReportTest
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
services:
- mysql
env:
- TESTENV=mysql,default
- TEST_COMMAND=jacocoRootReportIntegrationTest
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
services:
- postgresql
env:
- TESTENV=postgresql,default
- TEST_COMMAND=jacocoRootReportIntegrationTest
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=ldap,default
- TEST_COMMAND=jacocoRootReportIntegrationTest
- os: linux
dist: precise
jdk: oraclejdk8
sudo: required
language: java
env:
- TESTENV=default
- TEST_COMMAND=jacocoRootReportIntegrationTest
# - os: linux
# dist: trusty
# jdk: oraclejdk8
# sudo: required
# language: java
# env:
# - TESTENV=sqlserver,default
# - TEST_COMMAND=jacocoRootReportIntegrationTest
cache:
apt: true
directories:
- $HOME/.gradle
before_install:
- ulimit -c
- ulimit -a -S
- ulimit -a -H
- cat /proc/sys/kernel/core_pattern
- cat /etc/default/apport
- service --status-all || true
- initctl list || true
- mkdir -p ~/.gradle
- echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
- cat /etc/os-release
- cp $TRAVIS_BUILD_DIR/scripts/travis/init.gradle $HOME/.gradle
- if [ "$TESTENV" = "postgresql,default" ]; then
psql -c 'drop database if exists uaa;' -U postgres;
psql -c 'create database uaa;' -U postgres;
psql -c "drop user if exists root;" --dbname=uaa -U postgres;
psql -c "create user root with superuser password 'changeme';" --dbname=uaa -U postgres;
psql -c "show max_connections;" --dbname=uaa -U postgres;
fi
- if [ "$TESTENV" = "mysql,default" ]; then
mysql -e 'drop database if exists uaa;';
mysql -e 'CREATE DATABASE uaa DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;';
mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('changeme');";
mysql -u root -pchangeme -e "SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('changeme');";
fi
- if [ "$TESTENV" = "sqlserver,default" ]; then
./scripts/travis/sqlserver/install-mssqlserver-docker.sh;
./gradlew -b mssql.gradle createSQLServerUAA;
fi
install:
- sudo chmod a+w `readlink -f $JAVA_HOME/jre/lib/security/cacerts`
- ./scripts/travis/install-ldap-certs.sh
- ./scripts/ldap/install-ldap.sh ssl
- if [ "$TESTENV" = "keystone,default" ]; then ./scripts/keystone/install-keystone.sh; fi
- if [ "$TESTENV" = "ldap,default" ]; then ./scripts/ldap/configure-manifest.sh; fi
- if [ "$TESTENV" = "keystone,default" ]; then ./scripts/keystone/configure-manifest.sh; fi
- mkdir -p $HOME/build/cloudfoundry/uaa/uaa/build/reports/tests
- sudo apt-get -qy install lsof
script:
- sudo lsof -i :33389 || echo "Nothing listening on port 33389"
- sudo lsof -i :33636 || echo "Nothing listening on port 33636"
- echo "Test env $TESTENV"
- echo "Test cmd $TEST_COMMAND"
- ./gradlew "-Dspring.profiles.active=$TESTENV" "$TEST_COMMAND"
after_success:
- ./gradlew coveralls
- for i in $(find $HOME/build/cloudfoundry/uaa/ -name reports -type d); do rm -rf $i; done
- /bin/df -h
- /usr/bin/du -sh *
#- python scripts/travis/travis_after_all.py
#- export $(cat .to_export_back)
#- ! "if [ \"$BUILD_LEADER\" = \"YES\" ]; then\n if [ \"$BUILD_AGGREGATE_STATUS\"
# = \"others_succeeded\" ]; then\n echo \"All Succeeded!\"\n else\n echo \"Some Failed\"\n fi\nfi\n"
#after_failure:
#- python scripts/travis/travis_after_all.py
#- export $(cat .to_export_back)
#- ! "if [ \"$BUILD_LEADER\" = \"YES\" ]; then\n if [ \"$BUILD_AGGREGATE_STATUS\"
# = \"others_failed\" ]; then\n echo \"All Failed\"\n else\n echo \"Some Failed\"\n
# \ fi\nfi\n"
#after_script:
#- echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS
after_failure:
- /bin/df -h
- /usr/bin/du -sh *
addons:
hosts:
- testzone1.localhost
- testzone2.localhost
- testzone3.localhost
- testzone4.localhost
- testzonedoesnotexist.localhost
- oidcloginit.localhost
artifacts:
key:
secure: yRJd/NtH3uwSCtHLiJKt+X3ZPb57euSZA+gMG4/HkOTdkB0NuZnZaYb0GjKaLRbTAelqottjqPf5LVJXebBvjIAVH5R9C6yC1ghRYBPtHR3AJaod8ZTSUs+mLijvvhwfksKId4aZaF/GgNfPgFnC4IPybh21vTcAfrX4qS9FmN4=
secret:
secure: poV5WnsiLoks4bkd72cBOf/xbgWtD55e9tCodY5V8DFvdKUqxi8ty8ZrUbl54vsHcLcndP4Q0ByQqitkQ+xh+CbyTiBMqRK6mzn/HPuAmTjBXd8Lrc7PieXzKoPxrh0vMl1HtfBy/jii5zVPf2j5C2BxrDxlZCAGnZv+JSaOCKY=
bucket: cf-id-travis-failure-logs
debug: true
paths:
- $(find $HOME/build/cloudfoundry/uaa/ -name tests -type d | tr "\n" ":")