-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (61 loc) · 4.94 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
language: java
jdk: openjdk11
sudo: false
addons:
sonarcloud:
organization: "gerald24"
token:
secure: "jlQxCSSWxoq71tDxYXdyT7z+uwaYmF4/1+qmryKi7fQRGrUOhmMJ9aAm6SHAPAdxwUrJO2LGHzWLQbiCyVHqcvCpAt+BmAZS7uaCergCm2ovnhEsMwp+cRqfUc5wdy98tjF1jUM10NyNNgzk1m5aodvyUSGQWsHskmnbt2Bsnu9bNkvzcHHySunlOvrb/uQhwKSZA2khWHspqB22u/Rn4pSJFNhDbmh8J0r/PFVwguk1NkSywLXF8F9XFcKCeRSj0ojRvA/lT9OB6/2UEBTTggVVLAXDqwsRTZE4uE1gxyoUhNS5zraZo2a3qsoXtKZTBKOvttIpp3a9DRcuGwaWVBYrrm8XP00A4TX79p8nxUTxXDZFPKjEDdkFCyfQzVHbnNdxqxrVLMS2N2bn9Qm86wpoY+SDmXvr9h+YcwKvPjwae2mmTYNOU48mbXSF4LG9rEnZzolO2xFVT+2gyfPWt0ZG/FIeagnP7BV30yyoiFQVZMZjQezkLbocLDri+DxOxl634ftB2MsMJj/yjuEXWlehcpPwColjYbE2g39rVGxmfazlbTymk4YGeT2Hf/CAOCpFWHvrVVpt5NioZlzx+kb7kiI1+prJxc6ponrBKSoBHnj/e82rzTEFqBG1wO4fyluIx2utvunjbqOaawDen2b/pbhAAzG5oxbpZup+aQA="
cache:
directories:
- $HOME/.m2
stages:
- compile-test
- analyze
- release-github
- deploy-docker
- deploy-heroku
# skip Travis default mvn step
install: true
jobs:
include:
- stage: compile-test
if: fork = true # skip this step for internal use to avoid compiling twice, analyze step step will compile too
script: ./mvnw -B --no-transfer-progress clean verify
- stage: analyze
if: fork = false
script: ./mvnw -B --no-transfer-progress clean verify sonar:sonar -Pcoverage
- stage: release-github
if: (tag =~ ^v) AND fork = false AND type = push
env:
- GITHUB_USERNAME=ajgassner
# GITHUB_TOKEN
- secure: "+b/FPMSY1Ba4Gep+3HhPPmRCaDDmPkEXgNmvNhsvqxXdruCn58pGTNRUweWBr2BN02mL6idjT9kHoflqDpnkronPdfahrt3gz9r8TXM9KND0bOg1PiJMYrFfYDgtE6AfJMuiy7KLPrx6iH3nIVz42iWI+X77MNEWEWRQliS4/L+oP8rv7OKySI0J/UWoo1r9N4ElSn4i0whqX/XqCBbwi7uLesveannhABCfKxX+dHCAs6XAadpEujGJtJExBC6EGwtfO3yV59yBj8t53pOR9VV+FX8cogShvvmaNy54ZRRqc9sE0jbpdgacUoJUhv01zqRh7ar/eGYLXaS17HTI6h3P/6SscTS41MkBj5DbPpQiCy6X+PXfcd2qfy09vS0K0IzsUg2R10eqaZaGi190WHtQ47yiH3VMXcxicQqKLWFIxsk9sUjQ8dlG8XXWUsm7brOC1x/Di9qfo1+pn/RBbtGPZ/a5aK12EojSPRr1q2BET/K6lar3St3RSDa8f4sUq2auW1qCiJ8xosZ50peCdCW+3gP4D4Pgp7OaeCB+pfuGWtmE76jBl2M/pv1AGh1kj1WWBiJPaf/vqiuQrQEKhUW+bp79RP5liVDPd36YyU8ue75MFcLe8n7Fs5DEKHAM/f2z7DRd2wXnf+mtmVqyFNE0ye1hDSw1P9TAeEr3rWM="
script:
- ./mvnw -B --no-transfer-progress clean verify -DskipTests -Pprod
- ./release-github.sh $GITHUB_USERNAME $GITHUB_TOKEN $TRAVIS_TAG
- stage: deploy-docker
if: (branch = master OR (tag =~ ^v)) AND fork = false AND type = push
env:
- DOCKER_USERNAME=ajgassner
# DOCKER_PASSWORD
- secure: "4BrCzOE19dpcqLZ9Xowa6dWKn78dvQpY4ugHZdzxnEF8iru/n9LGP0PiKIgUcI0shv1F3ijmvzsDqoh8J0QlWU2AGaWC/R8MH58EhvKQSBDb/a9yLc3jKruW6IsAeOrAUmelm0nEew8kQJYuzaSKIPcBKlhXQG3duTjUR6t+KTDcPnVsd2sCDXfMShUlLwuPjBapXHPWCbSuI08Sdpct9hw/3Rldi8MygJoj6tUS10jKdVMw0LoohE7CEFYOSFUHyIWCKVL01ZxOyYQi9O5LZq+59hj5p9X6RyQerMNttA3sZuRs7g6f+I1oReY/wptWjHZ0RfhHFMcICVJnBn6Ji9+dZi0b2BRH650VSbNtzP/MKbtS/WGsB3+3xmlsqzB86L7VEf5oodFRRY0pPB7tYFcIUbBudW0l9XqntBBwUookKaCQItfYmovmAf4ItUDUh4QNyo+Tlibuc4FUJXHJx2FBoA2bP2EXum7Gr/9oxtES2hW60KNl20J7vnXaRJgnf6PfjMw2RIKO4oAeC4ep93QPQ6yMEUIVdOeeW2dbaqwB4Pa/hY6vjpSeISZlCWZRHybv4kb33PeaeQ/uFVNrsBTWu2kH5pDpxDmGLxZnIbtLSyTX7RlN4KeoCirblVDbyoGz9IUCKH5093P3hw6egiLnorejWU/19WLsuv9xksc="
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ -n "$TRAVIS_TAG" ]; then DOCKER_TAG=$TRAVIS_TAG; else DOCKER_TAG=latest; fi
- echo "Docker Tag ${DOCKER_TAG}"
- ./mvnw -B --no-transfer-progress clean verify -DskipTests -Pprod
- docker build -t ${DOCKER_USERNAME}/possy-service:${DOCKER_TAG} service
- docker push ${DOCKER_USERNAME}/possy-service:${DOCKER_TAG}
- docker build -t ${DOCKER_USERNAME}/possy-daemon:${DOCKER_TAG} daemon
- docker push ${DOCKER_USERNAME}/possy-daemon:${DOCKER_TAG}
- docker build -t ${DOCKER_USERNAME}/epson-tm-t20-cups:${DOCKER_TAG} epson-tm-t20-cups-docker
- docker push ${DOCKER_USERNAME}/epson-tm-t20-cups:${DOCKER_TAG}
- stage: deploy-heroku
if: branch = master AND fork = false AND type = push
env:
# HEROKU_API_KEY
secure: "2hRmhn9iVLFpXIAncBWqydrxOVq33DIeGqLAWeGcmfeG7m/lAnEOvOXFtIh7darJLomfsUdt5ujEocyTvJGeJfve0X9BxPc1z4FKTLLBoGjXk35wShJ98guq5YiVFyh+EVFUInsSVTroMWvBytrgql34WbX9y3dVVGGsrVA0jukcSrxPmliVOggDDXAbCMsZvtAhax8cO0A86FDu0sHFvs1EHEjoAn3biHkXB4LViZVORZucR0F8mg66KygwI0nzdaDpiJS0S8xzjKIgTYSyuALsobI4SLKk7XD6d9CpS7jUQ55aZzxuuDRKCpJecjVX4ZLmVjACrtSnTJvnj9Ed+S4EZS5WRWgNLZXafGCW932/mbycNp2nxkZbIJooZbGHeXHOt+JUrlgA9HXgTrYAsaKGHFTOkihLLvt7YqjABY5UH4zStgeZ8z93Yi2qHHsTf1R/ZVx6g9+446zJmNJ5j8LDIyYBMobxkAA6U6c0OyQnIaiQUHnw4TNYqY4x8AeGt24p7jDb3PGc5dBnQL4KMoC74KJdLIftjWm5jkk7bZEOh29uwyUg6GyPnHNawfWHpRqB5U8HEa2TrrpS7RRGgxJkVF5Alvz3Ux66XfRiTFq1ZsNbV39CZ2m4/KP1JNbL8LGRrrX1gGyUS49P2MEPKwQf1KLjm6VHy2wnbwVUq/w="
script:
- sh -c 'cd service && ../mvnw -B --no-transfer-progress clean heroku:deploy -DskipTests -Pprod'
- sh -c 'cd daemon && ../mvnw -B --no-transfer-progress clean heroku:deploy -DskipTests'