conjur-debify 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/conjur/debify/version.rb +1 -1
- data/lib/conjur/debify.rb +10 -19
- data/lib/conjur/fpm/package.sh +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24d8fe10e0486db7bb2507eb4437011c7b604553
|
4
|
+
data.tar.gz: 74d13c5b2998e96664c704b1f3e25e4d913c776d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cc53a5458f5dc85665a6a58b5fe15b0b373834645504fe2e9bc1a80caafddbbd8987f0939e45e111e14565bd00d9839307e7716d9f53c5cb3db30a4ce0d363b
|
7
|
+
data.tar.gz: 4d651e1ba3026f937ce23474e4710df624415416860cc814d4e272447fd3e33b063abf8cc998995e4c1cf22623d7cca3fbe6c5eeb898e991e08c563836dc0fcb
|
data/lib/conjur/debify.rb
CHANGED
@@ -122,19 +122,9 @@ command "package" do |c|
|
|
122
122
|
|
123
123
|
DebugMixin.debug_write "Built fpm image '#{image.id}' for project #{project_name}\n"
|
124
124
|
|
125
|
-
# Make it under HOME so that Docker can map the volume on MacOS
|
126
|
-
tempdir = File.expand_path((0...50).map { ('a'..'z').to_a[rand(26)] }.join, ENV['HOME'])
|
127
|
-
FileUtils.mkdir tempdir
|
128
|
-
at_exit do
|
129
|
-
FileUtils.rm_rf tempdir
|
130
|
-
end
|
131
|
-
|
132
125
|
options = {
|
133
126
|
'Cmd' => [ project_name, version ] + fpm_args,
|
134
|
-
'Image' => image.id
|
135
|
-
'Binds' => [
|
136
|
-
[ tempdir, '/dist' ].join(':')
|
137
|
-
]
|
127
|
+
'Image' => image.id
|
138
128
|
}
|
139
129
|
|
140
130
|
container = Docker::Container.create options
|
@@ -144,15 +134,16 @@ command "package" do |c|
|
|
144
134
|
status = container.wait
|
145
135
|
raise "Failed to package #{project_name}" unless status['StatusCode'] == 0
|
146
136
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
137
|
+
require 'rubygems/package'
|
138
|
+
deb = StringIO.new
|
139
|
+
container.copy("/src/#{package_name}") { |chunk| deb.write(chunk) }
|
140
|
+
deb.rewind
|
141
|
+
tar = Gem::Package::TarReader.new deb
|
142
|
+
tar.first.tap do |entry|
|
143
|
+
open(entry.full_name, 'wb') {|f| f.write(entry.read)}
|
144
|
+
FileUtils.ln_sf entry.full_name, entry.full_name.gsub(version, "latest")
|
145
|
+
puts entry.full_name
|
153
146
|
end
|
154
|
-
FileUtils.ln_sf deb_file, deb_file.gsub(version, "latest")
|
155
|
-
puts File.basename(deb_file)
|
156
147
|
ensure
|
157
148
|
container.delete(force: true)
|
158
149
|
end
|
data/lib/conjur/fpm/package.sh
CHANGED