assemblyline-cli 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/assemblyline/cli/version.rb +1 -1
- data/lib/assemblyline/cli.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTk1MDhkYTA0YWY1ZTBhYjg4YzUzZDgyYjczOTQ3NGZkOTZmZWViYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjI3MGUxNzcxNzc5ZGRjMmY5OWI3NTRhZWQ1MGJlNGQ4YjFjNWZhYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzZkZDM0ZmRmZjI5NTExMzZmN2QyNjQyODBlMGI4MmRlZTEwNTk2YjFkMDY5
|
10
|
+
MTM3ZWU1NmNlZjkzM2ZmODc4NzkyZWM2YmRjZmFiNWI0Yjc4YWFjMGY4NzY2
|
11
|
+
ODhmM2ZjYTFmN2JhZTUxYzcwZDBlYTYxZjU3N2U0N2ZmZTI3MTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTc5YWIyYzZmNjA1ZjkyZmI1NjIwNGIzZDQ5MzczYTNhMjllN2VkZGRmN2Yy
|
14
|
+
NzZkYjRiY2Y2MTg2MGZjODExMTE3ZDU1NmZmMGM1M2ZkNWZiNWQxYWI4MzAy
|
15
|
+
YzMyYjVkYTliNDg2NGI4MWMzYWZlYmM0MTJjZjg1NGJmNzI2MDg=
|
data/lib/assemblyline/cli.rb
CHANGED
@@ -5,17 +5,20 @@ module Assemblyline
|
|
5
5
|
class CLI < Thor
|
6
6
|
desc "build URL", "Build an assemblyline project from a git url"
|
7
7
|
def build(url)
|
8
|
-
exec "docker run --rm -
|
8
|
+
exec "docker run --rm -v /tmp:/tmp -v /var/run/docker.sock:/var/run/docker.sock -e SSH_KEY=#{ssh_key} -e DOCKERCFG=#{dockercfg} quay.io/assemblyline/builder:latest bin/build #{url}"
|
9
9
|
end
|
10
10
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def ssh_key
|
14
|
-
File.read(key_path)
|
14
|
+
key = File.read(key_path)
|
15
|
+
fail "SSH private key not found" unless key
|
16
|
+
key.dump
|
15
17
|
end
|
16
18
|
|
17
19
|
def dockercfg
|
18
|
-
File.read(File.join(ENV['HOME'], '.dockercfg')).
|
20
|
+
cfg = File.read(File.join(ENV['HOME'], '.dockercfg')).gsub("\n",'')
|
21
|
+
cfg.dump
|
19
22
|
end
|
20
23
|
|
21
24
|
def key_path
|