linecook-gem 0.7.19 → 0.7.20
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cffe2fbdae91964b5c3cb0f75ac10c11fdce9c07
|
4
|
+
data.tar.gz: cb9fc2c70f413702732092761d336ec5c7acfd3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82d380feb7cf146fca8bacf2e9b1b8c506f7fb8cdc944df645b3c46e3b10872c6cab6f23742fc6fe3986cc1efc540298ce057094ab4d82b6ecba201d2f51ebf
|
7
|
+
data.tar.gz: 91d6123a5f823c8c15843cbfa6c5c6e93593b71340d3da5fd42d8dca705c0eb769ef3b0168cf0cd5d10b5a35e3241f6cfa951656398a7bed5ee62f0537828fc6
|
@@ -28,7 +28,7 @@ module Linecook
|
|
28
28
|
FileUtils.mkdir_p(File.dirname(@image.path))
|
29
29
|
container.stop
|
30
30
|
with_retries(5) do
|
31
|
-
|
31
|
+
system("/bin/bash -c 'docker export #{@image.id} | xz -T 0 -0 > #{@image.path}; exit $((${PIPESTATUS[0]} | ${PIPESTATUS[1]}))'")
|
32
32
|
fail "Export failed" unless status
|
33
33
|
end
|
34
34
|
end
|
@@ -40,6 +40,7 @@ module Linecook
|
|
40
40
|
'umount /dev/{{ user `ebs_device` }}1',
|
41
41
|
'mkfs.ext4 /dev/{{ user `ebs_device` }}1',
|
42
42
|
'tune2fs -L cloudimg-rootfs /dev/{{ user `ebs_device` }}1',
|
43
|
+
'mkdir -p /mnt/packer-amazon-chroot-volumes/{{ user `ebs_device` }}',
|
43
44
|
'mount /dev/{{ user `ebs_device` }}1 /mnt/packer-amazon-chroot-volumes/{{ user `ebs_device` }}',
|
44
45
|
'tar -C /mnt/packer-amazon-chroot-volumes/{{ user `ebs_device` }} -xpf {{ user `source_image_path` }}',
|
45
46
|
'cp /etc/resolv.conf /mnt/packer-amazon-chroot-volumes/{{ user `ebs_device` }}/etc',
|
@@ -2,7 +2,7 @@ def with_retries(retries, sleep_duration: 5, &block)
|
|
2
2
|
attempts = 0
|
3
3
|
while attempts < retries
|
4
4
|
begin
|
5
|
-
yield
|
5
|
+
return yield
|
6
6
|
rescue => e
|
7
7
|
puts "Retrying a failed action, error was:"
|
8
8
|
puts e.message
|
@@ -11,4 +11,6 @@ def with_retries(retries, sleep_duration: 5, &block)
|
|
11
11
|
attempts += 1
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
fail "Retries exceed (#{retries})"
|
14
16
|
end
|
data/lib/linecook-gem/version.rb
CHANGED