evrone-ci-container_connector 0.2.0.pre28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +14 -0
- data/evrone-ci-container_connector.gemspec +28 -0
- data/lib/evrone/ci/container_connector.rb +26 -0
- data/lib/evrone/ci/container_connector/docker.rb +107 -0
- data/lib/evrone/ci/container_connector/docker/spawner.rb +35 -0
- data/lib/evrone/ci/container_connector/errors.rb +7 -0
- data/lib/evrone/ci/container_connector/local.rb +40 -0
- data/lib/evrone/ci/container_connector/local/spawner.rb +35 -0
- data/lib/evrone/ci/container_connector/version.rb +7 -0
- data/spec/lib/container_connector_spec.rb +11 -0
- data/spec/lib/docker_spec.rb +106 -0
- data/spec/lib/local_spec.rb +64 -0
- data/spec/spec_helper.rb +20 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bd2a09a02f72c332859d477eb81d8c4df2295c78
|
4
|
+
data.tar.gz: b1da1cd881271a1602826fe3ddfdcd7fa996e546
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9991e1fde8ada6f51f92c8b55b796b46651a3d103eabff4e89572ca60889dbc41b606861d692601e19de77cce41134a5c4a122f552f4d79e458ab401161f2d83
|
7
|
+
data.tar.gz: af880f407c073327d89370895c0dccc480a814f298a9e1d5ecb1b38b06578d87c6c5b1ba81f53cec6ed2cbff7185a0f977c8438918af28085a4af2be51b6fbfc
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Dmitry Galinsky
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Evrone::Ci::ContainerConnector
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'evrone-ci-container_connector'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install evrone-ci-container_connector
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.require
|
4
|
+
require "bundler/gem_tasks"
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec)
|
8
|
+
|
9
|
+
task :default => :spec
|
10
|
+
|
11
|
+
desc "run travis build"
|
12
|
+
task :travis do
|
13
|
+
exec "bundle exec rake SPEC_OPTS='--format documentation -t ~docker --order=rand'"
|
14
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'evrone/ci/container_connector/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "evrone-ci-container_connector"
|
8
|
+
spec.version = Evrone::CI::ContainerConnector::VERSION
|
9
|
+
spec.authors = ["Dmitry Galinsky"]
|
10
|
+
spec.email = ["dima.exe@gmail.com"]
|
11
|
+
spec.description = %q{ description }
|
12
|
+
spec.summary = %q{ summary }
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'docker-api', '= 1.5.4'
|
22
|
+
spec.add_runtime_dependency 'evrone-common-spawn', '= 0.0.7'
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "rr"
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path("../container_connector/version", __FILE__)
|
2
|
+
require File.expand_path("../container_connector/errors", __FILE__)
|
3
|
+
|
4
|
+
module Evrone
|
5
|
+
module CI
|
6
|
+
module ContainerConnector
|
7
|
+
|
8
|
+
autoload :Local, File.expand_path("../container_connector/local", __FILE__)
|
9
|
+
autoload :Docker, File.expand_path("../container_connector/docker", __FILE__)
|
10
|
+
|
11
|
+
extend self
|
12
|
+
|
13
|
+
def lookup(name, options = {})
|
14
|
+
case name.to_sym
|
15
|
+
when :docker
|
16
|
+
Docker.new options
|
17
|
+
when :local
|
18
|
+
Local.new options
|
19
|
+
else
|
20
|
+
raise NotFoundConnector.new("No available connector for #{name.inspect} found")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'docker'
|
2
|
+
require 'logger'
|
3
|
+
require 'evrone/common/spawn'
|
4
|
+
|
5
|
+
module Evrone
|
6
|
+
module CI
|
7
|
+
module ContainerConnector
|
8
|
+
|
9
|
+
class Docker
|
10
|
+
|
11
|
+
autoload :Spawner, File.expand_path("../docker/spawner", __FILE__)
|
12
|
+
|
13
|
+
include Evrone::Common::Spawn
|
14
|
+
|
15
|
+
attr_reader :user, :password, :init, :image, :remote_dir, :logger
|
16
|
+
|
17
|
+
@@default_container_options = {}
|
18
|
+
@@default_ssh_port = 22
|
19
|
+
@@host_to_connect_override = nil
|
20
|
+
|
21
|
+
class << self
|
22
|
+
def default_container_options
|
23
|
+
@@default_container_options
|
24
|
+
end
|
25
|
+
|
26
|
+
def default_ssh_port(val = nil)
|
27
|
+
@@default_ssh_port = val if val
|
28
|
+
@@default_ssh_port
|
29
|
+
end
|
30
|
+
|
31
|
+
def host_to_connect_override(val = nil)
|
32
|
+
@@host_to_connect_override = val if val
|
33
|
+
@@host_to_connect_override
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize(options = {})
|
38
|
+
@user = options[:user] || "ci"
|
39
|
+
@password = options[:password] || "ci"
|
40
|
+
@init = options[:init] || %w{ /usr/bin/runsvdir -P /etc/service }
|
41
|
+
@image = options[:image] || "dmexe/ci"
|
42
|
+
@remote_dir = options[:remote_dir] || "/home/#{user}"
|
43
|
+
@logger = options[:logger] || ::Logger.new(STDOUT)
|
44
|
+
end
|
45
|
+
|
46
|
+
def start(&block)
|
47
|
+
start_container do |container|
|
48
|
+
open_ssh_session(container, &block)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def container_options
|
53
|
+
self.class.default_container_options.merge(
|
54
|
+
'Cmd' => init,
|
55
|
+
'Image' => image,
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def open_ssh_session(container)
|
62
|
+
host = self.class.host_to_connect_override || container.json['NetworkSettings']['IPAddress']
|
63
|
+
|
64
|
+
ssh_options = {
|
65
|
+
password: password,
|
66
|
+
port: self.class.default_ssh_port,
|
67
|
+
paranoid: false,
|
68
|
+
forward_agent: false
|
69
|
+
}
|
70
|
+
logger.info "open ssh session to #{user}@#{host}"
|
71
|
+
attempts = 0
|
72
|
+
begin
|
73
|
+
open_ssh(host, user, ssh_options) do |ssh|
|
74
|
+
logger.info "ssh session opened"
|
75
|
+
yield Spawner.new(container, ssh, remote_dir)
|
76
|
+
end
|
77
|
+
rescue ::Net::SSH::AuthenticationFailed => e
|
78
|
+
logger.error "got #{e.inspect}, retry #{attempts}"
|
79
|
+
sleep 0.5
|
80
|
+
attempts += 1
|
81
|
+
if attempts > 5
|
82
|
+
raise e
|
83
|
+
else
|
84
|
+
retry
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def start_container(&block)
|
90
|
+
container = ::Docker::Container.create container_options
|
91
|
+
container.start
|
92
|
+
|
93
|
+
begin
|
94
|
+
logger.info "start container #{container.id}"
|
95
|
+
sleep 3
|
96
|
+
yield container
|
97
|
+
ensure
|
98
|
+
container.stop
|
99
|
+
logger.info "stop container #{container.id}"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
module Evrone
|
3
|
+
module CI
|
4
|
+
module ContainerConnector
|
5
|
+
|
6
|
+
class Docker
|
7
|
+
|
8
|
+
class Spawner
|
9
|
+
attr_reader :container, :ssh, :work_dir
|
10
|
+
|
11
|
+
def initialize(container, ssh, work_dir)
|
12
|
+
@container = container
|
13
|
+
@ssh = ssh
|
14
|
+
@work_dir = work_dir
|
15
|
+
end
|
16
|
+
|
17
|
+
def spawn(*args, &logger)
|
18
|
+
env = args.first.is_a?(Hash) ? args.shift : {}
|
19
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
20
|
+
cmd = args
|
21
|
+
|
22
|
+
options.merge!(chdir: work_dir)
|
23
|
+
|
24
|
+
ssh.spawn(env, cmd, options, &logger)
|
25
|
+
end
|
26
|
+
|
27
|
+
def id
|
28
|
+
container.id
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
module Evrone
|
6
|
+
module CI
|
7
|
+
module ContainerConnector
|
8
|
+
|
9
|
+
class Local
|
10
|
+
|
11
|
+
autoload :Spawner, File.expand_path("../local/spawner", __FILE__)
|
12
|
+
|
13
|
+
attr_reader :work_dir, :logger
|
14
|
+
|
15
|
+
def initialize(options = {})
|
16
|
+
@work_dir = options[:work_dir] || default_work_dir
|
17
|
+
@work_dir = File.expand_path(@work_dir)
|
18
|
+
@logger = options[:logger] || Logger.new(STDOUT)
|
19
|
+
end
|
20
|
+
|
21
|
+
def start(&block)
|
22
|
+
FileUtils.rm_rf(work_dir)
|
23
|
+
FileUtils.mkdir_p(work_dir)
|
24
|
+
|
25
|
+
spawner = Spawner.new(work_dir)
|
26
|
+
logger.info "inside #{work_dir}"
|
27
|
+
yield spawner
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def default_work_dir
|
33
|
+
"#{Dir.tmpdir}/.local_connector"
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'evrone/common/spawn'
|
2
|
+
|
3
|
+
module Evrone
|
4
|
+
module CI
|
5
|
+
module ContainerConnector
|
6
|
+
|
7
|
+
class Local
|
8
|
+
class Spawner
|
9
|
+
include Evrone::Common::Spawn
|
10
|
+
|
11
|
+
attr_reader :work_dir
|
12
|
+
|
13
|
+
def initialize(work_dir)
|
14
|
+
@work_dir = work_dir
|
15
|
+
end
|
16
|
+
|
17
|
+
def spawn(*args, &logger)
|
18
|
+
env = args.first.is_a?(Hash) ? args.shift : {}
|
19
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
20
|
+
cmd = args
|
21
|
+
|
22
|
+
options.merge!(chdir: work_dir)
|
23
|
+
|
24
|
+
super(env, cmd, options, &logger)
|
25
|
+
end
|
26
|
+
|
27
|
+
def id
|
28
|
+
'local'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Evrone::CI::ContainerConnector do
|
4
|
+
it { should be }
|
5
|
+
|
6
|
+
context "lookup" do
|
7
|
+
it "should return local connector" do
|
8
|
+
expect(described_class.lookup(:local)).to be_an_instance_of(Evrone::CI::ContainerConnector::Local)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Evrone::CI::ContainerConnector::Docker do
|
4
|
+
let(:conn) { described_class.new }
|
5
|
+
|
6
|
+
it { should be }
|
7
|
+
|
8
|
+
context "logger" do
|
9
|
+
subject { conn.logger }
|
10
|
+
it { should be }
|
11
|
+
end
|
12
|
+
|
13
|
+
context "container_options" do
|
14
|
+
subject { conn.container_options }
|
15
|
+
it { should eq("Cmd" => ["/usr/bin/runsvdir", "-P", "/etc/service"],
|
16
|
+
"Image" => "dmexe/ci") }
|
17
|
+
end
|
18
|
+
|
19
|
+
context "user" do
|
20
|
+
subject { conn.user }
|
21
|
+
|
22
|
+
it "by default should eq 'ci'" do
|
23
|
+
expect(subject).to eq 'ci'
|
24
|
+
end
|
25
|
+
|
26
|
+
it "when passed via options should be" do
|
27
|
+
expect(described_class.new(user: "user").user).to eq 'user'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "password" do
|
32
|
+
subject { conn.password }
|
33
|
+
|
34
|
+
it "by default should eq 'ci'" do
|
35
|
+
expect(subject).to eq 'ci'
|
36
|
+
end
|
37
|
+
|
38
|
+
it "when passed via options should be" do
|
39
|
+
expect(described_class.new(password: "pass").password).to eq 'pass'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context "image" do
|
44
|
+
subject { conn.image }
|
45
|
+
|
46
|
+
it "by default should eq 'dmexe/ci'" do
|
47
|
+
expect(subject).to eq 'dmexe/ci'
|
48
|
+
end
|
49
|
+
|
50
|
+
it "when passed via options should be" do
|
51
|
+
expect(described_class.new(image: "image").image).to eq 'image'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "init" do
|
56
|
+
subject { conn.init }
|
57
|
+
|
58
|
+
it "by default should be" do
|
59
|
+
expect(subject).to eq ["/usr/bin/runsvdir", "-P", "/etc/service"]
|
60
|
+
end
|
61
|
+
|
62
|
+
it "when passed via options should be" do
|
63
|
+
expect(described_class.new(init: "init").init).to eq 'init'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "start container", docker: true do
|
68
|
+
it 'should be successfuly' do
|
69
|
+
rs = nil
|
70
|
+
conn.start do |spawner|
|
71
|
+
rs = spawner.id
|
72
|
+
end
|
73
|
+
expect(rs).to_not be_empty
|
74
|
+
end
|
75
|
+
|
76
|
+
context "and spawn script" do
|
77
|
+
it "successfuly" do
|
78
|
+
rs = ""
|
79
|
+
code = nil
|
80
|
+
|
81
|
+
conn.start do |spawner|
|
82
|
+
code = spawner.spawn("echo $PWD") do |out|
|
83
|
+
rs << out
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
expect(rs).to eq "/home/ci\n"
|
88
|
+
expect(code).to eq 0
|
89
|
+
end
|
90
|
+
|
91
|
+
it "failed" do
|
92
|
+
code = nil
|
93
|
+
rs = ""
|
94
|
+
conn.start do |spawner|
|
95
|
+
code = spawner.spawn('ls /notexists') do |out|
|
96
|
+
rs << out
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
expect([1,2]).to be_include(code)
|
101
|
+
expect(rs).to match(/No such file or directory/)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Evrone::CI::ContainerConnector::Local do
|
4
|
+
let(:conn) { described_class.new }
|
5
|
+
subject { conn }
|
6
|
+
|
7
|
+
it { should be }
|
8
|
+
|
9
|
+
context "work_dir" do
|
10
|
+
it "by default should be inside Dir.tmpdir" do
|
11
|
+
expect(conn.work_dir).to eq("#{Dir.tmpdir}/.local_connector")
|
12
|
+
end
|
13
|
+
|
14
|
+
it "when passed via options, should be" do
|
15
|
+
expect(described_class.new(work_dir: "/tmp").work_dir).to eq '/tmp'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "start container" do
|
20
|
+
|
21
|
+
it "spawner id should eq local" do
|
22
|
+
rs = nil
|
23
|
+
conn.start do |spawner|
|
24
|
+
rs = spawner.id
|
25
|
+
end
|
26
|
+
expect(rs).to eq 'local'
|
27
|
+
end
|
28
|
+
|
29
|
+
context "and spawn script" do
|
30
|
+
it "successfuly" do
|
31
|
+
rs = ""
|
32
|
+
code = nil
|
33
|
+
|
34
|
+
conn.start do |spawner|
|
35
|
+
code = spawner.spawn("echo $PWD") do |out|
|
36
|
+
rs << out
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
dir = "#{Dir.tmpdir}/.local_connector\n"
|
41
|
+
if RUBY_PLATFORM =~ /darwin/
|
42
|
+
dir.gsub!(/^\/var/, '/private/var')
|
43
|
+
end
|
44
|
+
|
45
|
+
expect(rs).to eq dir
|
46
|
+
expect(code).to eq 0
|
47
|
+
end
|
48
|
+
|
49
|
+
it "failed" do
|
50
|
+
code = nil
|
51
|
+
rs = ""
|
52
|
+
conn.start do |spawner|
|
53
|
+
code = spawner.spawn('ls /notexists') do |out|
|
54
|
+
rs << out
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
expect([1,2]).to be_include(code)
|
59
|
+
expect(rs).to match(/No such file or directory/)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.expand_path '../../lib/evrone/ci/container_connector', __FILE__
|
2
|
+
|
3
|
+
Bundler.require(:test)
|
4
|
+
require 'rspec/autorun'
|
5
|
+
|
6
|
+
Dir[File.expand_path("../..", __FILE__) + "/spec/support/**/*.rb"].each {|f| require f}
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.mock_with :rr
|
10
|
+
|
11
|
+
config.before(:suite) do
|
12
|
+
=begin
|
13
|
+
Evrone::CI::ContainerConnector::Docker.default_container_options.merge!(
|
14
|
+
'PortSpecs' => ['2022:22']
|
15
|
+
)
|
16
|
+
Evrone::CI::ContainerConnector::Docker.default_ssh_port 2223
|
17
|
+
Evrone::CI::ContainerConnector::Docker.host_to_connect_override 'localhost'
|
18
|
+
=end
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: evrone-ci-container_connector
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0.pre28
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dmitry Galinsky
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: docker-api
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.5.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.5.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: evrone-common-spawn
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.7
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.7
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rr
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: ' description '
|
98
|
+
email:
|
99
|
+
- dima.exe@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- .gitignore
|
105
|
+
- .rspec
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE.txt
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- evrone-ci-container_connector.gemspec
|
111
|
+
- lib/evrone/ci/container_connector.rb
|
112
|
+
- lib/evrone/ci/container_connector/docker.rb
|
113
|
+
- lib/evrone/ci/container_connector/docker/spawner.rb
|
114
|
+
- lib/evrone/ci/container_connector/errors.rb
|
115
|
+
- lib/evrone/ci/container_connector/local.rb
|
116
|
+
- lib/evrone/ci/container_connector/local/spawner.rb
|
117
|
+
- lib/evrone/ci/container_connector/version.rb
|
118
|
+
- spec/lib/container_connector_spec.rb
|
119
|
+
- spec/lib/docker_spec.rb
|
120
|
+
- spec/lib/local_spec.rb
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
homepage: ''
|
123
|
+
licenses:
|
124
|
+
- MIT
|
125
|
+
metadata: {}
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - '>'
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 1.3.1
|
140
|
+
requirements: []
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 2.1.11
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
145
|
+
summary: summary
|
146
|
+
test_files:
|
147
|
+
- spec/lib/container_connector_spec.rb
|
148
|
+
- spec/lib/docker_spec.rb
|
149
|
+
- spec/lib/local_spec.rb
|
150
|
+
- spec/spec_helper.rb
|