Skip to content

Commit d707ed5

Browse files
committed
feat(travis): Handle git tags
1 parent 42e09ac commit d707ed5

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

.travis.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@ sudo: required
44
language: python
55
python:
66
- "3.6"
7+
env:
8+
- REPO=maur1th/naxos-forum SRC=app/forum
9+
- REPO=maur1th/naxos-websocket SRC=app/websocket
710

811
# SonarQube
912
addons:
1013
sonarqube:
11-
organization: maur1th-github
12-
token:
13-
secure: dzX6Q6EX3AGio/VLeWUr8QQgYc1aOf367JS0dltK4CwIZgb8+WbRT9n5UiwGB/TQ7HQMOU95CL0aUccy+KTY3RRCTBf/M71rs9HGp//lvG+mRLevQIBrVV38XE+D6cUHYpCl3HPCoSuuUhIoSXbazOAiHeY1hw7TtsDG0c2qe90MbsyWWZ8mphteHriI2FNWznxb6RHVultMxhkv3YAWf1P21hWkVf2XyA0floIWH06vuRATd55HYYRPjHv+GeSpWtQd8HYCrQ+dv82W6NhZ+m/NB68UA+81eK9oFOLyeOZIRfyagDbfDMNf4Do2HDzAUjIujU0z0MqYjdcYMxUpN631Q1HYUT8BhHVUMEX7pViLa99w1P++p8r4ZqXhipkR59NsxeHAIsu0sDMbeJQu37BWaRurVrKjN/wk3UZwgM75Bigtqv0cQvvgkmXFi2rU9OMujr+CNlu7O1Lj4ZNFNBpINaseXBDGtOytBhnUQpZvqqgzS0uBloe7Inwv5Nf4KATCc2PBZJt4P46noW8+P8E0JnPu5KSG4OtDDFUlp2uylldH88jNXA7K+SNbCSujPyrVXBxLFJq5bS1/WJU/vQ9S5hpHUoAm3G6v4aLH0afW6Ohx9SAXlS+I1y+JLH/m67WoKPCCJ73FieYBOlUAG8lIkwyWT4bNEXG2tiPxLX0=
14+
organization: default
1415

1516
# App
1617
services:
1718
- docker
1819
script:
20+
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
21+
- docker build --tag $REPO:$TAG $SRC
22+
- if [ -n "$TRAVIS_TAG" ]; then
23+
docker tag $REPO:$TAG $REPO:$TRAVIS_TAG;
24+
fi
1925
- sonar-scanner
20-
- docker build --tag maur1th/naxos-forum app/forum
21-
- docker build --tag maur1th/naxos-websocket app/websocket
2226
after_success:
2327
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
24-
- docker push maur1th/naxos-forum
25-
- docker push maur1th/naxos-websocket
28+
- docker push $REPO
29+
30+
notifications:
31+
email: false

sonar-project.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# must be unique in a given SonarQube instance
22
sonar.projectKey=maur1th:naxos
33
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
4+
sonar.projectName=Naxos
45

56
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
67
# Since SonarQube 4.2, this property is optional if sonar.modules is set.
78
# If not set, SonarQube starts looking for source code from the directory containing
89
# the sonar-project.properties file.
9-
sonar.sources=app/naxos/
10+
sonar.sources=app/
1011

1112
# Encoding of the source code. Default is default system encoding
1213
sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)