forked from SoftInstigate/restheart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (65 loc) · 2.74 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
dist: trusty
sudo: false
language: java
jdk:
- oraclejdk8
notifications:
email:
recipients:
- info@softinstigate.com
on_success: always
slack:
secure: IeoyrbTPjPtopkmTFbcCzgy+9q8MMzhla9lXhZYdqsbn19KKe4UKNp0Cu0SY601ss586Lw4jsegvba6LFF3bi3j4aK0ZITtGJ4PYGvYByh3O7zi4Y0K2RUeYU1CfTIl18QBHcAIjQSmKLJPnyN9Y5Y4/4KhfWTqXy7tvkB36Oys=
sudo: false
addons:
apt:
sources:
- mongodb-upstart
- mongodb-3.2-trusty
packages:
- mongodb-org-server
- mongodb-org-shell
- oracle-java8-installer
sonarcloud:
organization: "softinstigate"
token:
secure: "IMY8Ove0KKHwrNFJ+C3kkK12lIENnEtlhNzzANaaS71bls+VA80t5Ri6wti0p3VDnFzXBNC7il1KWGBit5G5t5RpKi53hfwjrzUF3lFjF03P8OPpiMh9pt0sB7vuVvKMON80e4bWTCN0nw0eBlvLNqB+6vW/8KIfwBKo+Abya/g="
cache:
directories:
- '$HOME/.m2'
- '$HOME/.sonar/cache'
services:
- mongodb
- docker
install: true
before_script:
- git submodule update --init --recursive
script:
- mvn clean install -DskipITs=false
after_success:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
mvn clean -Dmaven.test.skip=true org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar;
mvn deploy --settings deploy-settings.xml -Dmaven.test.skip=true;
export RESTHEART_VERSION=$(./bin/project-version.sh 2>/dev/null);
if [[ $RESTHEART_VERSION ]]; then
echo "Building Docker image for RESTHeart $RESTHEART_VERSION";
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS";
cd Docker && cp ../target/restheart.jar . ;
docker build -t softinstigate/restheart:$RESTHEART_VERSION . ;
docker push softinstigate/restheart:$RESTHEART_VERSION;
echo "Branch is $TRAVIS_BRANCH";
if [ "$TRAVIS_BRANCH" == "master" ]; then
echo "On master branch. Tagging image softinstigate/restheart:$RESTHEART_VERSION as latest";
docker tag softinstigate/restheart:$RESTHEART_VERSION softinstigate/restheart:latest;
docker push softinstigate/restheart:latest;
fi
else
echo "ERROR! Variable RESTHEART_VERSION is undefined";
exit 1;
fi
fi
env:
global:
- secure: rlLQCDykTqV7/EC+kTCw5JpYbuZwk0Neq5q1kRQ6hjcUYRdgjPJretVg+1e5+GcGOH4/Z/aOGdQrk1HtPW6tE+ePIUDAUwuLX2+6AUt2FqIqumYoJxYR7rsw+THkjiPaopB7qmWOUJ1vec7QCEiaGexYcjs3j6mv//SbnUksY2w=
- secure: t4tS+6EAC9nuE9SOKMfooux34usyPY2oBt0/737A2o9y3LXgy/jt0hyx09W4Gc1ZHq8QYoEiwHU40rlo2KWcxPKK/e4U/dZ1ne5OBJLKt5dhGr/PwaO0rVa7039zgQRn1VN+ayx92AfQCZMyA7iTrVDrM/2lxvDww0UYyZmViaA=
- secure: NJiw/JRqiwYkEx2eisu5yllgX6oKJwhV60SldnlpnHqWzOaqXoqsKLOiP18cBPeLT6BuVYT9Z0PyaI9+2bPzt2IUC6vKuhimPYA0IRqoDfAcdSKa/Q1LcbLdbX+T941IE0iPlVesh3iFf41Cc5BM5ND2fu/yRlAHOcJFTdSqGAs=