-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis-old.yml
55 lines (46 loc) · 2.26 KB
/
.travis-old.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
51
52
53
54
55
sudo: required
language: generic
services:
- docker
before_install:
# TODO: use latest instead of 0.7.0 (After this is fixed https://github.com/codeclimate/test-reporter/issues/449)
- |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64\
> /tmp/cc-test-reporter
- chmod +x /tmp/cc-test-reporter
- get_image() { [[ "$(docker images -q ${1} 2> /dev/null)" != "" ]] && echo ${1} || echo ${2}; }
- env > .env
- mv travis-docker-compose.yml docker-compose.yml
- docker compose pull && docker pull ${DOCKER_IMAGE_SERVER_B} || true
- |
docker build\
--cache-from $(get_image ${DOCKER_IMAGE_SERVER_B} ${DOCKER_IMAGE_SERVER})\
--tag ${DOCKER_IMAGE_SERVER} --tag ${DOCKER_IMAGE_SERVER_B} .
before_script:
- /tmp/cc-test-reporter before-build
script:
- docker compose run server /code/scripts/run_tests.sh
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- /tmp/cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- docker compose push server
- docker push ${DOCKER_IMAGE_SERVER_B}
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: ./htmlcov
on:
branch: develop
notifications:
slack:
rooms:
- secure: "VRVU1jcDK5Pj14xxVwNHFVvSBQ5ZcP8MVZojkJ0xXrnokxoRNlJZ2vUzvXRtDas8t5tDEDAS6jtdodDp12GHgZEhiQakk8JJ8AidDcWLhj30t1pE+bL3rmI9sdDPJOnDxPvFkG+7S7OpPX247EMER/4PXrPtgDZegfttv3nPzBRIUbd9ocXmHRJbHOkKLV30vwGbk2ZjZFjJq5GzovT0Te5MyCiYS4LsmgtyX0i8BVtlU7tgvm7JavqVRXL08ZlGzFEzUNF1lSrt7S6DzUtUzeRaLJ0J/5vr18gaFX2CZieF/b6ETqRo4OUoXv/b2cJtLtz3TFdwa/OSaTbk3ZiQkhmb3tZsOBjvJKaXyLxcVWm6jkRDcDh5ePdZWxVAWnDfl1zAapr5yBE94zKr6NDiY1OjZumlaRjx+KTSNt1KgOf8awFB/Q8tfeMvOZxGnpw1/oiNDnsmcK9KQLDCsSLoKR15cjHXy9ByML357qZ0IkWLWmPfP8Q5SNCANegbB0Y8v7aK4u8uTIyqVSfjTRJceikm21vV0381fijG+VDRhskQx0OedpgnZFSv6WpOlwipcDNfaQmcSGDbaIHUln0C/AVfHOswKiX9+xYv4bstdqPgDST5PxSZ8RZY2U/HHcFVyP8mQZFuhQrScISCFn6J9wI/07p0Xu1+rwjG0bgDIVw="
env:
global:
- DOCKER_DB_IMAGE=thedeep/deep-postgres:latest
- DOCKER_IMAGE=thedeep/deep-server
- DOCKER_IMAGE_SERVER=${DOCKER_IMAGE}:latest
- DOCKER_TAG_SERVER=`echo ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} | tr / _`
- DOCKER_IMAGE_SERVER_B=${DOCKER_IMAGE}:${DOCKER_TAG_SERVER}