-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
37 lines (28 loc) · 1.52 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
language: java
addons:
apt:
packages:
- xml2
sonarcloud:
organization: robsonbittencourt-github
token:
secure: lUrnzKywEn9M40CewnCwtBkgBMw07sWorXtSio916iL0jvatCthPyLogTuY+7auuKZeAzsoABsMI/+qe2TfJio50/HpnF2DEL+x1U5TN2dZfx7QO2/vIN+/zNtBcLaX0cNP+KzE1oFwjY7oxC3G8wQM4te8GS/K2ePxJoK1ybVMt4SkaDTZAI5/r+cnygAinC5ReD7joicxne3U2U5ldLHz2GpOaWd0g2K7ETSs0JrdiAP+I/aXRnSi/1GoOhHJ/a6HKst53vl1sdF8Ocv1eH3Yp/oLuVwIBiny7QD3iPAR3P2NJF4aDFseRey2y2ATOCDgA1F6tevakXU8vM/uQf2IVx8I1kRrhfgGllG7talFzSjhemUBptIMMJp03F1uPMIp4/CtCwRUA4qm64WAYFA21fW2rQXgQ8V/u0svA2j7xBnT6STo2tYrD2iWIxgXjIkPlGDgCHzxqGWqkWvzS5e4di/khLFgEacMMQU/YDXCe2+B/pHXovNBdcPSroKJMLNk6fF9oun7AHbqQlqqrEQ47hGQ85beFA2cuYy34lUNRP/MFUDYLm94l17wREb8oFJce3c0bntSpKnlPfYlbiyfUlL3ypQpmDGJX6u+ZpfZdcFWooxbgibxwGmzgH9er2y9+EzlZxUMmaj9BQ/RC5fdR93l8jefxit4reVfuvlY=
branches:
- master
- develop
jdk:
- oraclejdk11
script:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ;
export VERSION=`xml2 < pom.xml | grep /project/version= | sed 's/.*=//'`;
docker build --build-arg version=${VERSION} -t robsonbittencourt/gafanhoto:latest -t robsonbittencourt/gafanhoto:${VERSION} . ;
docker push docker.io/robsonbittencourt/gafanhoto:latest ;
docker push docker.io/robsonbittencourt/gafanhoto:${VERSION} ;
fi
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.sonar/cache"