indocker 0.1.2 → 0.1.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/indocker/repositories/clonner.rb +3 -1
- data/lib/indocker/repositories/git.rb +5 -2
- data/lib/indocker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8c37678a3d0b00e17c7e819b8565f0a4bb9330351a66711da35ab2a4fb6681e
|
|
4
|
+
data.tar.gz: dc921c4c6839a9b31392a8373f1231c359261d8759eab8566934a221ddcb9d14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78e90ff4a4970faa4e98b968da758e11fe8bcfd391a68f38c9c1c16210b09dbd93c6801e35873e2fa2fc5348af6e6467b3dfb299d4e3e879ef16391f43730504
|
|
7
|
+
data.tar.gz: f585568265e524e2061bd3e8aab6330c8d4c0a0379ee6a0f4a05ad82dfe6089cbd1624205c98cbfb2df98af80ac81671289e51502f0f1fe45b1fdee1473e605f
|
data/Gemfile.lock
CHANGED
|
@@ -10,6 +10,8 @@ class Indocker::Repositories::Clonner
|
|
|
10
10
|
raise ArgumenError.new("only git repositories should be clonned") if !repository.is_git?
|
|
11
11
|
|
|
12
12
|
session.exec!("rm -rf #{repository.clone_path} && mkdir -p #{repository.clone_path}")
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
git_command = "git clone -b #{repository.branch} --depth 1 #{repository.remote_url} #{repository.clone_path}"
|
|
15
|
+
session.exec!("ssh-agent bash -c 'ssh-add ~/.ssh/#{repository.ssh_key}; #{git_command}'")
|
|
14
16
|
end
|
|
15
17
|
end
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
class Indocker::Repositories::Git < Indocker::Repositories::Abstract
|
|
2
|
-
attr_reader :remote_url, :remote_name, :email, :password, :branch
|
|
2
|
+
attr_reader :remote_url, :remote_name, :email, :password, :branch, :ssh_key
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
DEFAULT_SSH_KEY = "id_rsa"
|
|
5
|
+
|
|
6
|
+
def setup(remote_name:, remote_url:, email: nil, password: nil, branch:, clone_path: nil, ssh_key: DEFAULT_SSH_KEY)
|
|
5
7
|
@remote_name = remote_name
|
|
6
8
|
@remote_url = remote_url
|
|
7
9
|
@email = email
|
|
8
10
|
@password = password
|
|
9
11
|
@branch = branch
|
|
10
12
|
@clone_path = clone_path
|
|
13
|
+
@ssh_key = ssh_key
|
|
11
14
|
self
|
|
12
15
|
end
|
|
13
16
|
|
data/lib/indocker/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: indocker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ruslan Gatiyatov
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-06-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: net-ssh
|