-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
46 lines (38 loc) · 1.55 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
# Copyright 2019 Iced Development, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Set up travis with:
# env vars:
# - HEROKU_AUTH_TOKEN from: heroku authorizations:create -d "travis-ci for hsl-members-api"
# - HEROKU_APP either hsl-members-api-staging (for master) or hsl-members-api (for production)
#
language: generic
services:
- docker
before_install:
# install heroku CLI
- wget -qO- https://toolbelt.heroku.com/install.sh | sh
- docker login --username=_ --password=$HEROKU_AUTH_TOKEN registry.heroku.com
install:
- cp docker-compose.dist.yml docker-compose.yml #&& sed -i "s^/home/YOUR_USER/YOUR_PATH/THIS_FOLDER^`pwd`^g" docker-compose.yml
- docker-compose up -d
script:
- docker exec -it members_ui sh -c 'sleep 30s && wget -q -O - localhost:3005 && echo "SUCCESS"'
before_deploy:
- docker tag members_ui_members_ui:latest registry.heroku.com/$HEROKU_APP/web
deploy:
provider: script
script: docker push registry.heroku.com/$HEROKU_APP/web && HEROKU_API_KEY=$HEROKU_AUTH_TOKEN heroku container:release web -a $HEROKU_APP
on:
branch: master