-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
70 lines (60 loc) · 2.66 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
language: ruby
services:
- docker
addons:
artifacts:
paths:
- './log'
env:
global:
- DOCKER_VERSION=17.03.0~ce-0~ubuntu-trusty
- DOCKER_COMPOSE_VERSION=1.11.2
before_install:
- # Once travis pre-installs newer versions of docker & docker compose, the following can be removed
- # However, saves a lot of complexity by starting with their docker services configured & then calling these updates.
- docker -v
- docker-compose -v
- # List docker-engine versions
- apt-cache madison docker-engine
- # Update docker
- sudo apt-get install docker-engine=${DOCKER_VERSION}
- docker -v
- docker-compose -v
- # Update 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-compose -v
install:
- docker-compose build
before_script:
- docker-compose run --rm --no-deps web echo 'Gems now pre-installed.'
- # Use 'run ...` instead of 'exec ...` so that entrypoint's customized bundle install runs completely.
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d
- # The detached `up` also runs entrypoint — but because it's detached,
- # bundle install doesn't finish before shell moves on to next commands.
- docker ps
- docker-compose exec web rails db:setup
script:
- docker-compose exec web rails test
before_cache:
- docker-compose logs > ./log/docker-ci.log
- docker-compose exec web rails tmp:clear
- docker-compose down
deploy:
provider: heroku
on: master
app: jfmk-auth-staging
api_key:
secure: VFq4RjzrBs77MxsBETeIJv65PoGkbFIOyyKAdraoZ3tC9CTiYvST8clmMu5ai/U349NCoH9oPhRxAsmvcq9DNF5/KDdq7/qeL6XaIhV2lwhqt9GgA834gepapTOuaONjNKzCqo3UDRNf8gei6xBbdH7Jd6BFIqyLHDu3jLRym91InXu8LMq4nm2RKeQPIxj1cOcg5eH0R0kS9oubjtUDO9zufsbTQ+jRNP8LnncoQhT4+pYJAI8C7d9PD9QVVmPtKSR7H6IFz7DDPmvUkZ0IfuskYWeSO5XIejGLtSgUWTboQXjCy3HEew4XhfrapR91QAMJSdBMwE8DezX/RrVGEzT/Qiq8zYMIdGEqnwH6wHl8KHlcp0e+R1SDqOIe5JMSCddkv/Y2VqfAprwaYRMHBA2AzFhgEUH5NgNSy9w8TSPyBiEwLWc9ZrvrrYQ7G9tJQHw0fOromNww9ewF84rfh07VD3wV0hVsU+F1MCngNX/teyyV7Qjf5ukCYTFiLMKQYmGZr5SHJUGtFDe0wwDMWgKRFvOMTzxw7eJycelPiqMn5dJb/c8l2y4XmWVV3/oDpVCVxae1eEtPbp2mAxPdRa/k7yqhH1kQ0uVC8Mqcuzh7LjPYZOW7vMUAJQ1Y33tdewza9fTLcU74Is98AoQCh4rnoOHMdF6cioAAgbrp54U=
run:
- 'rails db:migrate'
- 'rails db:schema:cache:clear'
- 'rails tmp:clear'
- 'rails assets:precompile'
- restart
# For travis beta cache feature, might need to expose bundler vendor/cache
# as a volume in docker-compose in order to leverage this feature
#cache: true
#before_cache:
# - docker-compose exec test bundle clean