forked from iDigBio/idigbio-search-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (26 loc) · 969 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
sudo: required
services:
- docker
install:
- docker build -t $BUILDING .
script:
- docker run -v $TRAVIS_BUILD_DIR/__tests__/mock:/var/www/__tests__/mock/:ro -it $BUILDING
bash -c "yarn test && npm ls --depth 0 && node --version && nodejs --version " --rm
after_success:
- docker login --username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD"
deploy:
- provider: script
script: docker tag $BUILDING $DOCKER_IMAGE:$TRAVIS_TAG; docker push $DOCKER_IMAGE:$TRAVIS_TAG
on:
tags: true
- provider: script
script: docker tag $BUILDING $DOCKER_IMAGE:$TRAVIS_BRANCH; docker push $DOCKER_IMAGE:$TRAVIS_BRANCH
on:
all_branches: true
env:
global:
- DOCKER_IMAGE=idigbio/idigbio-search-api
- BUILDING=$DOCKER_IMAGE:$TRAVIS_COMMIT
notifications:
slack:
secure: hBdS1mIVFVg8jTQwU2nXKyfLRPbUMYCQK0g+NEjkSvWl3hvAnZREGo2JBFgincdB2/wAJhuynBQXN7MSwxGm4jTjvTrs1SOPP7hssTr+xFrXuOs9tYDNLICcUmc8iIkt9oblw/jWCKHUDnphmcZ4sy3uJDuxuKGHdBjXYAq/eZw=