-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (40 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
38
39
40
41
42
43
44
45
46
47
48
49
50
language: java
jdk:
- openjdk8
services:
- docker
addons:
sonarcloud:
organization: "giskardb"
token:
secure:
- echo "$SONAR_TOKEN"
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
jobs:
include:
- script:
# Show Java version
- java -version
# Show Maven version
- mvn --version
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=GiskardB_springQrCodeApp
# Compile spring boot app
- mvn install
name: "Compile spring app project on Travis Host"
- script:
# Login into Heroku Container Registry first, so that we can push our Image later
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin registry.heroku.com
# Compile App with Docker
- docker build . --tag=registry.heroku.com/qrcode-spring/web
# Push to Heroku Container Registry
- docker push registry.heroku.com/qrcode-spring/web
# Release Dockerized Native Spring Boot App on Heroku
- chmod +x heroku-release.sh && ./heroku-release.sh qrcode-spring
# Push to Docker Hub also
- echo "$DOCKER_HUB_TOKEN" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
- docker tag registry.heroku.com/qrcode-spring/web giskardocker80/qrcode-spring:latest
- docker push giskardocker80/qrcode-spring:latest
name: "Docker Image compile on Travis & Push to Heroku Container Registry and Docker Hub"