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 +4 -4
- data/lib/shippy/deployer.rb +3 -0
- data/lib/shippy/docker/client.rb +9 -1
- data/lib/shippy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a2298a6d94f32d0806671b2a6bac47a04cfeb628b40e4c7d265c9212de2a9a5
|
|
4
|
+
data.tar.gz: 6afec3af342b493695d3afdb34a7f4bf6c1ab839393e595c123005fb9e3a6d93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec171c742bd1808a0647b2c5a017d4db62ed26e6e0c832844fc2438b966eb5cf5bb5474b958f7cc92f8f91e127f4ee60fe5df31ee3489a1e28404d5b685961b8
|
|
7
|
+
data.tar.gz: 46c255b01d31766abd742c1321d1316abdfa8ad73fef2862c803420ffe25f535e3621c98c7e60d294770eb25b3d6f0b54d54d02f213702321d0de4cfe1d75136
|
data/lib/shippy/deployer.rb
CHANGED
|
@@ -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)
|
data/lib/shippy/docker/client.rb
CHANGED
|
@@ -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
|
data/lib/shippy/version.rb
CHANGED