-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa71f99
commit 4408b20
Showing
9 changed files
with
107 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
matrix: | ||
include: | ||
- DOCKER_RUBY_VERSION: "2.2" | ||
RUBY_IMAGE_TAG: "2.2-1" | ||
|
||
- DOCKER_RUBY_VERSION: "1.9.3" | ||
RUBY_IMAGE_TAG: "1.9.3-2" | ||
|
||
build: | ||
image: abakpress/dind:2 | ||
privileged: true | ||
volumes: | ||
- /home/data/drone/images:/images | ||
- /home/data/drone/gems:/bundle | ||
- /home/data/drone/key_cache:/ssh_keys | ||
environment: | ||
- COMPOSE_FILE_EXT=drone | ||
- RAILS_ENV=test | ||
commands: | ||
- wrapdocker docker -v | ||
|
||
- if [ ! -e /images/ssh-agent.tar ]; then docker pull whilp/ssh-agent; docker save whilp/ssh-agent > /images/ssh-agent.tar; fi | ||
- if [ ! -e /images/ruby_$RUBY_IMAGE_TAG.tar ]; then docker pull abakpress/ruby:$RUBY_IMAGE_TAG; docker save abakpress/ruby:$RUBY_IMAGE_TAG > /images/ruby_$RUBY_IMAGE_TAG.tar; fi | ||
|
||
- docker load -i /images/ssh-agent.tar | ||
- docker load -i /images/ruby_$RUBY_IMAGE_TAG.tar | ||
|
||
- dip ssh add -T -v /ssh_keys -k /ssh_keys/id_rsa | ||
- dip provision | ||
- dip rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
appraise 'activesupport3.1' do | ||
gem 'activesupport', '~> 3.1.0' | ||
end | ||
end if RUBY_VERSION < '2' | ||
|
||
appraise 'activesupport3.2' do | ||
gem 'activesupport', '~> 3.2.0' | ||
end | ||
|
||
appraise 'activesupport4.0' do | ||
gem 'activesupport', '~> 4.0.13' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version: '1' | ||
|
||
environment: | ||
DOCKER_RUBY_VERSION: 1.9.3 | ||
RUBY_IMAGE_TAG: 1.9.3-2 | ||
POSTGRES_IMAGE_TAG: 9.3 | ||
COMPOSE_FILE_EXT: development | ||
RAILS_ENV: test | ||
APRESS_GEMS_CREDENTIALS: "" | ||
|
||
compose: | ||
files: | ||
- docker-compose.yml | ||
- docker-compose.${COMPOSE_FILE_EXT}.yml | ||
|
||
interaction: | ||
sh: | ||
service: app | ||
|
||
bundle: | ||
service: app | ||
command: bundle | ||
|
||
appraisal: | ||
service: app | ||
command: bundle exec appraisal | ||
|
||
rspec: | ||
service: app | ||
command: bundle exec appraisal bundle exec rspec | ||
|
||
clean: | ||
service: app | ||
command: rm -f Gemfile.lock gemfiles/*.gemfile.* | ||
|
||
provision: | ||
- docker volume create --name bundler_data | ||
- dip bundle config --local https://gems.railsc.ru/ ${APRESS_GEMS_CREDENTIALS} | ||
- dip bundle install | ||
- dip sh mkdir -p gemfiles/.bundle | ||
- dip sh ln -sf ../../.bundle/config /app/gemfiles/.bundle/config | ||
- dip appraisal install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '2' | ||
|
||
services: | ||
app: | ||
volumes: | ||
- bundler_data:/bundle | ||
|
||
volumes: | ||
bundler_data: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '2' | ||
|
||
services: | ||
app: | ||
volumes: | ||
- /bundle:/bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '2' | ||
|
||
services: | ||
app: | ||
image: abakpress/ruby:$RUBY_IMAGE_TAG | ||
environment: | ||
- BUNDLE_PATH=/bundle/$DOCKER_RUBY_VERSION | ||
- SSH_AUTH_SOCK=/ssh/auth/sock | ||
command: bash | ||
volumes: | ||
- .:/app | ||
- ssh_data:/ssh:ro | ||
|
||
volumes: | ||
ssh_data: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'bundler/setup' | ||
require 'pry-debugger' | ||
|
||
require 'simplecov' | ||
SimpleCov.start do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters