-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.yml.full
50 lines (50 loc) · 2.83 KB
/
travis.yml.full
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
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.23.2
- secure: hio7jGlgwDi8MwTNMY0HSWfRv+DtDKPUt1dvKtT58ItsOZxXbtTnoaaO0dQY61eAATXxhZIluK2/QbNCAAiId3iD9HYNA0J2H7Bqe2cYjVkiA7Oo9jRyW9tYMTnWTJ05utCRisq2Pb/PTRkK/9YZFUirt1IxZRozpWV6iUOZiAHn3NXTEpJFWjKH1+r6lMqStQ9BJM6I+SDDesgk6nCA5OTBM2kvi3iZ3OLrKjr607AH2xjBq0gSB/LLTFP2DVaxkOMqWQ0H2hRTVHoulngtDwGhXdXytP5igG8+hZXqY66AaCDU589UGdqADu39tI1JkHF1+oK5eO81vJ+VehBpHigx+suxamV7TCE8vv9cBWa2iyJb7XqNq4/b+qu6LbJ9cpMFUVq8XwAa1MUXA4sAUL62RBzZVxCtpIoX7rx7tepvnpHNXpQGmIdOR/hqLfqr12g0Zvy/Hp4WHQWxOQ/Bu3gZ1EK8g+K6MIxNx8CTODEbpkQO2/r/sI/Jg8dvzuPHxdaER6MVzOiII7jpmUL9ZvHX6EP1gYfHl7BptiBBSDzSnyBK1KDRo/cacJ3Srfw+q+bego6T8Mn5+Zp5Fbbf//tGYrSwTtblkCXS0SsHjLTlAUIWoXSzGYpW9PcbCu+oRVvKFjAt2+evN7b8WXFa0K/KqDg5dBLhfX9ls8PuYyI=
- secure: mL2SN4YANfMAyJXfd0x+Map22u7Y4q4TRLIM1ZojWJbGUl0Qu+gw4oYTJwu9pG2XvexRFIVMAVSbJiqoCYiqmihJpMrADw4qsCluhNJadzf9pZkXrpiVvJBSPqQZomNDGf77xhJe15rrKKOM1D+OqeuuaGHDEuEsPf+mzN22sjFvDvJcJ7gFjCMowC/Ryrxf7BIsr5lQG3PLOeZUNemNuaNtvYOj6/tGG8Rw8EHgK6qa6ikiI09yDuDAXhG6thC1zQvAH7ZmMr+9Qpe54cTFk+wcMIWwfzJYkm9qB1135kBDaxcN3CpxfN/WIE1Nyx6ZcHPi01eMoKO1sAg113giEBr3MijSZom/2Oi7N8iZb1f8Tlg/2ROa70Srq2jWRi8aiG3sFh9O7P34+fHv7tGJIUGOpq/yXIA4XP/GyS31/RdDPrmNkwZGPafvdKn+6oJj48Fuw5d//15LKwGvEZKywV/Yueb/IAI4BzX0nl4K9MQkD2FLZHoTlEO2EePGBri3liArx0q+CkHYjtxhtVh6BHxeChC0AGuRh5clbnR32xvPbTzsYiVAIuubz82VTDNy/gSii9+tgxYhOEmu1OOdKaua3lM24ZveLRRZ9HnSeXs8oGA+1cSOOJeQCdo3c/g8fTlpa2jXajAqnzSNTU9CJUh6FqJAzrhXJqhM+T2esUk=
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname
-s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker --version
- docker-compose version
- echo "Login into Docker Hub"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export GIT_SHA=`git rev-parse --short HEAD`
- echo "Building commit $GIT_SHA"
jobs:
include:
- stage: tests
name: Unit Tests
script:
- cd Chapter04
- docker-compose build db
- docker-compose build test-postgresql
- docker-compose run test-postgresql
- stage: tests
name: Static Analysis
script:
- cd Chapter04
- docker-compose build static-analysis
- docker-compose run static-analysis
- stage: push
script:
- cd Chapter04
- docker-compose build server
- docker tag thoughts_server:latest majeformation/jd-thoughts-backend:$GIT_SHA
- docker push majeformation/jd-thoughts-backend:$GIT_SHA
- docker tag thoughts_server:latest majeformation/jd-thoughts-backend:$TRAVIS_BRANCH
deploy:
- provider: script
script: docker push majeformation/jd-thoughts-backend:$TRAVIS_BRANCH
on:
branch: master
- provider: script
script: docker push majeformation/jd-thoughts-backend:$TRAVIS_TAG
on:
tags: true