forked from hygieia/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (34 loc) · 951 Bytes
/
.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
language: java
jdk:
- openjdk8
services:
- docker
branches:
only:
- "/^v[0-9]+\\.[0-9]+\\.[0-9]+.*$/"
install: true
before_script:
- sudo chown -R $USER:$GROUP $TRAVIS_BUILD_DIR
script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [[ "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then cp ./src/devops/release.sh . && ./release.sh; fi
- export TAG=$TRAVIS_BRANCH
- export IMAGE_NAME='hygieiadoc/api'
- echo $IMAGE_NAME
- echo $TAG
- docker build -t $IMAGE_NAME .
- docker tag $IMAGE_NAME $IMAGE_NAME:$TAG
- docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
- docker push $IMAGE_NAME
notifications:
webhooks:
urls: https://webhooks.gitter.im/e/48597b0f75dd571734bc
on_success: always
on_failure: always
on_start: always
email:
recipients:
on_success: always
on_failure: always