forked from ledermann/docker-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
33 lines (25 loc) · 894 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
28
29
30
31
32
33
sudo: required
language: ruby
services:
- docker
install: true # skip the installation step entirely
before_script:
- sudo sysctl -w vm.max_map_count=262144 # Required for Elasticsearch
script:
- docker-compose -f docker-compose.test.yml build --pull
- docker-compose -f docker-compose.test.yml run --rm app sh -c "./docker/wait-for-services.sh && bundle exec rake db:create spec rubocop"
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export REPO=$DOCKER_USERNAME/docker-rails
- docker-compose -f docker-compose.production.yml build
deploy:
-
provider: script
script: docker tag dockerrails_app_production $REPO:latest && docker push $REPO
on:
branch: develop
-
provider: script
script: docker tag dockerrails_app_production $REPO:${TRAVIS_TAG} && docker push $REPO
on:
tags: true