forked from cloudfoundry/uaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (67 loc) · 2.56 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
language: java
branches:
except:
- /^travis-success-.*$/
env:
global:
- secure: "Ubdyw9qc/AVX61ZTehLm90NG5q+qCIPljY5nYNmmkjvNKRIpx1bYIDjFflfXbSKn+opqBdpo5qQJwLQwO1xCvWfDsAO9YlriiqIZQuYXynAqe0hCqKkMn7OqTDR+rZuA+jl7t7LVwWhwbQ4+IiAC44d6CKIa1WPhmgy5dHxBKac="
matrix:
- TESTENV=default
- TESTENV=mysql,default
- TESTENV=postgresql,default
- TESTENV=ldap,default
# - TESTENV=keystone,default
cache:
apt: true
directories:
- $HOME/.gradle
services:
- mysql
- postgresql
before_install:
- cp $TRAVIS_BUILD_DIR/scripts/travis/init.gradle $HOME/.gradle
- git pull --unshallow
- 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
- mysql -e 'drop database if exists uaa;'
- mysql -e 'create database uaa;'
- mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('changeme');"
- mysql -e "SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('changeme');"
install:
- if [ "$TESTENV" = "ldap,default" ]; then ./scripts/ldap/install-ldap.sh; fi
- if [ "$TESTENV" = "keystone,default" ]; then ./scripts/keystone/install-keystone.sh; fi
- $TRAVIS_BUILD_DIR/scripts/travis/apply_spring_profiles_to_uaa_yaml.sh $TESTENV
- if [ "$TESTENV" = "ldap,default" ]; then ./scripts/ldap/configure-manifest.sh; fi
- if [ "$TESTENV" = "keystone,default" ]; then ./scripts/keystone/configure-manifest.sh; fi
script:
- ./gradlew -Dspring.profiles.active=$TESTENV cobertura
after_success:
- ./gradlew coveralls
- python scripts/travis/travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
echo "All Succeeded!"
if [ "$TRAVIS_BRANCH" = "develop" ]; then
curl https://api.github.com/repos/cloudfoundry/uaa/git/refs -H "Content-Type:application/json" -H "Authorization: token $GH_TOKEN" -d "{\"ref\":\"refs/tags/travis-success-$TRAVIS_BUILD_NUMBER\",\"sha\":\"$TRAVIS_COMMIT\"}"
fi
else
echo "Some Failed"
fi
fi
after_failure:
- python scripts/travis/travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
echo "All Failed"
else
echo "Some Failed"
fi
fi
after_script:
- echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS