barbeque 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -2
- data/lib/barbeque/executor/hako.rb +25 -7
- data/lib/barbeque/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 55e5ddccef50d8012d519620dec44f063f85f29b399bc6eb4a9a540b4df31821
|
4
|
+
data.tar.gz: 7a05fba8fd639bd69c6f9dacb95cfe2d4304ff18723f13eda6d6dc7a8f8e09f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826610de1fa826d2478307188ffd96ad7f7a73d039556261cf07998ece853c9b68cd95ed8ed7f3034f519d63d69674b5aa3fbfef65a08cd3d179bb21e0fc8992
|
7
|
+
data.tar.gz: 14aba5a62e4a4150463de75a357641012eddcb964c889b5820eabd42c95f0caec971298473d5b7b1977989c1297898b53b5bc602b9c015a22b217f2220d7e2d5
|
data/README.md
CHANGED
@@ -14,11 +14,20 @@ module Barbeque
|
|
14
14
|
|
15
15
|
# @param [String] hako_dir
|
16
16
|
# @param [Hash] hako_env
|
17
|
-
# @param [String]
|
18
|
-
|
17
|
+
# @param [String] definition_dir
|
18
|
+
# @param [String] yaml_dir (deprecated: renamed to definition_dir)
|
19
|
+
def initialize(hako_dir:, hako_env: {}, yaml_dir: nil, definition_dir: nil, oneshot_notification_prefix:)
|
19
20
|
@hako_dir = hako_dir
|
20
21
|
@hako_env = hako_env
|
21
|
-
@
|
22
|
+
@definition_dir =
|
23
|
+
if definition_dir
|
24
|
+
definition_dir
|
25
|
+
elsif yaml_dir
|
26
|
+
warn 'yaml_dir option is renamed to definition_dir. Please update config/barbeque.yml'
|
27
|
+
yaml_dir
|
28
|
+
else
|
29
|
+
raise ArgumentError.new('definition_dir is required')
|
30
|
+
end
|
22
31
|
@hako_s3_client = HakoS3Client.new(oneshot_notification_prefix)
|
23
32
|
end
|
24
33
|
|
@@ -104,10 +113,19 @@ module Barbeque
|
|
104
113
|
private
|
105
114
|
|
106
115
|
def build_hako_oneshot_command(docker_image, command, envs)
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
]
|
116
|
+
jsonnet_path = File.join(@definition_dir, "#{docker_image.repository}.jsonnet")
|
117
|
+
yaml_path = File.join(@definition_dir, "#{docker_image.repository}.yml")
|
118
|
+
|
119
|
+
cmd = ['bundle', 'exec', 'hako', 'oneshot', '--no-wait', '--tag', docker_image.tag, *env_options(envs)]
|
120
|
+
if File.readable?(jsonnet_path)
|
121
|
+
cmd << jsonnet_path
|
122
|
+
elsif File.readable?(yaml_path)
|
123
|
+
cmd << yaml_path
|
124
|
+
else
|
125
|
+
raise HakoCommandError.new("No definition found matching '#{docker_image.repository}' in #{@definition_dir}")
|
126
|
+
end
|
127
|
+
cmd << '--'
|
128
|
+
cmd.concat(command)
|
111
129
|
end
|
112
130
|
|
113
131
|
def env_options(envs)
|
data/lib/barbeque/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barbeque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: adminlte2-rails
|
@@ -470,7 +470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
470
470
|
version: '0'
|
471
471
|
requirements: []
|
472
472
|
rubyforge_project:
|
473
|
-
rubygems_version: 2.
|
473
|
+
rubygems_version: 2.7.3
|
474
474
|
signing_key:
|
475
475
|
specification_version: 4
|
476
476
|
summary: Job queue system to run job with Docker
|