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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzIxNTEzMDE1YWZlNTFkNjVkODQwZmY2Yjg4MzNiMDAzOTNiZDg5OA==
4
+ NTk1MDhkYTA0YWY1ZTBhYjg4YzUzZDgyYjczOTQ3NGZkOTZmZWViYw==
5
5
  data.tar.gz: !binary |-
6
- ZWY5ZDhlYzA5NzZhYTA3NGNjMjA0NmM3ZmVlZDBjNTc3MDIyYjMwMg==
6
+ ZjI3MGUxNzcxNzc5ZGRjMmY5OWI3NTRhZWQ1MGJlNGQ4YjFjNWZhYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDJkMDU3N2E4YmVhZGI3MWM4ZGM0ZGE4NDQ1YmQ5ZmFjOWZlMTU3YzdkMzdi
10
- NDQ2NzI1NDM4NmUxZjIzZDVmNjkzMjk4MmY5NDUxYmIwMTI5M2E3ODk2ZmJm
11
- YzA2YzRmZDc3MjcyYzU3ZDVmM2JiNTQxYjhlYjg0ZjVmZmIyMDQ=
9
+ MzZkZDM0ZmRmZjI5NTExMzZmN2QyNjQyODBlMGI4MmRlZTEwNTk2YjFkMDY5
10
+ MTM3ZWU1NmNlZjkzM2ZmODc4NzkyZWM2YmRjZmFiNWI0Yjc4YWFjMGY4NzY2
11
+ ODhmM2ZjYTFmN2JhZTUxYzcwZDBlYTYxZjU3N2U0N2ZmZTI3MTY=
12
12
  data.tar.gz: !binary |-
13
- ODBlYzFlODk2ZTRhOTI2ZWYzMWRlZDFlODcwOWU0YTFiYTY1NTUxZWYxZWY0
14
- OWU0NmZiNDIyM2JkNDA3OGQyOWYxZDY4NDE1NmRjNzI5MzY3M2U5NjJjZmYx
15
- ZjhjOThjZTI2ZGY2OGEyMTg3OGQyYTJlZjJkZjIzYTk3NzY1YTc=
13
+ MTc5YWIyYzZmNjA1ZjkyZmI1NjIwNGIzZDQ5MzczYTNhMjllN2VkZGRmN2Yy
14
+ NzZkYjRiY2Y2MTg2MGZjODExMTE3ZDU1NmZmMGM1M2ZkNWZiNWQxYWI4MzAy
15
+ YzMyYjVkYTliNDg2NGI4MWMzYWZlYmM0MTJjZjg1NGJmNzI2MDg=
@@ -1,3 +1,3 @@
1
1
  module Assemblyline
2
- CLI_VERSION = "0.0.2"
2
+ CLI_VERSION = "0.0.3"
3
3
  end
@@ -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 -ti -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}"
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).dump
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')).dump
20
+ cfg = File.read(File.join(ENV['HOME'], '.dockercfg')).gsub("\n",'')
21
+ cfg.dump
19
22
  end
20
23
 
21
24
  def key_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assemblyline-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Robinson