shippy 0.2.6 → 0.2.7

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
  SHA256:
3
- metadata.gz: e9ad6a9811193f1cba32cbbbb3caaadbe7baabd6cdeedd7b9d3462af3a311e41
4
- data.tar.gz: 68c148787b05aaa7bd3cea51bad53ab73638c592d0dd1967329fcda427d64466
3
+ metadata.gz: 8a2298a6d94f32d0806671b2a6bac47a04cfeb628b40e4c7d265c9212de2a9a5
4
+ data.tar.gz: 6afec3af342b493695d3afdb34a7f4bf6c1ab839393e595c123005fb9e3a6d93
5
5
  SHA512:
6
- metadata.gz: 926e9d0c76ff27f776ff16917b4c6142c3446961f2f4b343e15ad88096a8bcdbd1e53de6e699686f058c6c51b506da9ad4608c1fc143af282bb68d981c90c1c6
7
- data.tar.gz: dbf4e8d28ac653c354effda9ec3ec1ff901c4d3c1554e41db644d92b226c98c840fbf1f963b876f182f91861d2ff248f7854560374d28a6af3bcff847c6ef9e4
6
+ metadata.gz: ec171c742bd1808a0647b2c5a017d4db62ed26e6e0c832844fc2438b966eb5cf5bb5474b958f7cc92f8f91e127f4ee60fe5df31ee3489a1e28404d5b685961b8
7
+ data.tar.gz: 46c255b01d31766abd742c1321d1316abdfa8ad73fef2862c803420ffe25f535e3621c98c7e60d294770eb25b3d6f0b54d54d02f213702321d0de4cfe1d75136
@@ -27,6 +27,9 @@ module Shippy
27
27
  @ui.say "Pulling images...", :blue
28
28
  @docker.compose_pull(@remote_app.current_path, stream: true)
29
29
 
30
+ @ui.say "Pinning image digests...", :blue
31
+ @docker.pin_image_digests(@remote_app.current_path)
32
+
30
33
  if backup_path
31
34
  @ui.say "Stopping old version...", :yellow
32
35
  @docker.compose_down(backup_path)
@@ -47,6 +47,15 @@ module Shippy
47
47
  end
48
48
  end
49
49
 
50
+ def pin_image_digests(path)
51
+ on(@host) do
52
+ within(path) do
53
+ execute :docker, :compose, :config, "--resolve-image-digests > docker-compose.pinned.yml"
54
+ execute :mv, "docker-compose.pinned.yml", "docker-compose.yml"
55
+ end
56
+ end
57
+ end
58
+
50
59
  def compose_restart(path, services = [])
51
60
  on(@host) do
52
61
  within(path) do
@@ -58,7 +67,6 @@ module Shippy
58
67
  def run_hook(path, service, options, command)
59
68
  on(@host) do
60
69
  within(path) do
61
- # Ensure options are treated as args
62
70
  args = [:docker, :compose, :run, "--rm"]
63
71
  args << options if options && !options.empty?
64
72
  args << service
@@ -1,3 +1,3 @@
1
1
  module Shippy
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shippy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marius Bobin