forked from doanduyhai/killrvideo-java
-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
46 lines (40 loc) · 3.77 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
language: generic
# Sudo required for doing docker build
sudo: required
services:
- docker
# Build the app and a docker image
script:
- travis_fold start docker_build
- docker run -v ${PWD}:/opt/killrvideo-java -w /opt/killrvideo-java maven mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B
- docker build -t ${TRAVIS_COMMIT} -t killrvideo-java-local .
- travis_fold end docker_build
- travis_fold start docker_dependencies_up
- docker-compose -f docker-compose.ci.yml up -d dse dse-config
- sleep 180
- docker-compose -f docker-compose.ci.yml up -d backend
- sleep 180
- docker-compose -f docker-compose.ci.yml exec backend echo 'Still alive!' || { echo "Backend is down"; docker-compose -f docker-compose.ci.yml logs dse-config backend; exit 1; }
- travis_fold end docker_dependencies_up
- docker run --network killrvideo-java_default killrvideo/killrvideo-integration-tests
# If successful, see if we need to publish also
after_success:
- "[ \"$TRAVIS_EVENT_TYPE\" = \"cron\" ] && { echo \"Ignore nightly builds\"; travis_terminate 0; }"
- test -z $TRAVIS_TAG && { echo "Ignore non-tagged builds"; travis_terminate 0; }
- docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-java:${TRAVIS_TAG}
- echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
- docker push killrvideo/killrvideo-java:${TRAVIS_TAG}
- "[ \"$(git tag --sort=-v:refname | grep -P \"^\\d+.\\d+.\\d+$\" | head -n1)\" == \"$TRAVIS_TAG\" ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-java:latest; docker push killrvideo/killrvideo-java:latest; }"
after_failure:
- travis_fold start docker_logs
- docker-compose -f docker-compose.ci.yml logs dse-config backend
- travis_fold end docker_logs
env:
global:
# DOCKER_USER & PASS
- secure: hL9G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