-
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
18aad28
commit c4961e0
Showing
9 changed files
with
107 additions
and
19 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-4" | ||
|
||
- DOCKER_RUBY_VERSION: "1.9.3" | ||
RUBY_IMAGE_TAG: "1.9.3-4" | ||
|
||
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
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,39 @@ | ||
version: '1' | ||
|
||
environment: | ||
DOCKER_RUBY_VERSION: 2.2 | ||
RUBY_IMAGE_TAG: 2.2-4 | ||
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 | ||
|
||
irb: | ||
service: app | ||
command: irb | ||
|
||
bundle: | ||
service: app | ||
command: bundle | ||
|
||
rspec: | ||
service: app | ||
command: bundle exec rspec | ||
|
||
clean: | ||
service: app | ||
command: rm -f Gemfile.lock | ||
|
||
provision: | ||
- docker volume create --name bundler_data | ||
|
||
- dip bundle config --local https://gems.railsc.ru/ ${APRESS_GEMS_CREDENTIALS} | ||
- dip bundle 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,17 @@ | ||
version: '2' | ||
|
||
services: | ||
app: | ||
volumes: | ||
- ../:/localgems | ||
- bundler-data:/bundle | ||
- ssh-data:/ssh:ro | ||
|
||
volumes: | ||
bundler-data: | ||
external: | ||
name: bundler_data | ||
|
||
ssh-data: | ||
external: | ||
name: ssh_data |
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,11 @@ | ||
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 |
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
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