contained 0.8.0 → 0.9.0
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/contained/task/deploy.rb +1 -4
- data/lib/contained/task/setup.rb +2 -5
- data/lib/contained/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: 9cd0f486e60a10bab86075204281d68473e4cb4b68dad6511a8051b3bed42525
|
4
|
+
data.tar.gz: 915b6f46f9bc11a54a6b8af80f0029a7d38f21e83c6ceb2e0550bd582e66f14e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573eaf7a77cccb4cf341d4d957389402f805905200dd09dc45312f1dcd8217eba054961f7a29c9abdc6fc3cc58ac4cdaf9b1dce3d9af37a109813e5d10a1241c
|
7
|
+
data.tar.gz: fb9b6336368af6a4338325c19ed1a83eaa354822564f59b0c5ba3d4634a1d6615dd4d03d86b03d0c7fb9acab4afe1605aab840d702e7c3e0b546fe3d7418fc9c
|
@@ -9,16 +9,13 @@ module Contained
|
|
9
9
|
class Deploy < Base
|
10
10
|
def execute!
|
11
11
|
stack = @config.fetch("stack")
|
12
|
-
registry = @config.fetch("registry", { "server" => "hub.docker.com" })
|
13
12
|
username = ENV["DOCKER_LOGIN"]
|
14
13
|
password = ENV["DOCKER_PASSWORD"]
|
15
14
|
|
16
15
|
@stdout.puts("[deploy] stack=#{stack} environment=#{@environment}")
|
17
16
|
|
18
17
|
on hosts, in: :sequence do
|
19
|
-
if username && password
|
20
|
-
execute(:docker, :login, registry.fetch("server", "hub.docker.com"), "-u", username, "-p", password)
|
21
|
-
end
|
18
|
+
execute(:docker, :login, "-u", username, "-p", password) if username && password
|
22
19
|
|
23
20
|
execute(<<~BASH)
|
24
21
|
source ./.contained/#{stack}/.env
|
data/lib/contained/task/setup.rb
CHANGED
@@ -7,7 +7,6 @@ module Contained
|
|
7
7
|
class Setup < Base
|
8
8
|
def execute!
|
9
9
|
stack = @config.fetch("stack")
|
10
|
-
registry = @config.fetch("registry", { "server" => "hub.docker.com" })
|
11
10
|
username = ENV["DOCKER_LOGIN"]
|
12
11
|
password = ENV["DOCKER_PASSWORD"]
|
13
12
|
|
@@ -17,11 +16,9 @@ module Contained
|
|
17
16
|
@stdout.puts("[setup] stack=#{stack} environment=#{@environment}")
|
18
17
|
|
19
18
|
on hosts, in: :sequence do
|
20
|
-
execute(:docker, :
|
19
|
+
execute(:docker, :login, "-u", username, "-p", password) if username && password
|
21
20
|
|
22
|
-
|
23
|
-
execute(:docker, :login, registry.fetch("server", "hub.docker.com"), "-u", username, "-p", password)
|
24
|
-
end
|
21
|
+
execute(:docker, :swarm, :init) unless capture(:docker, :info).include?("Swarm: active")
|
25
22
|
|
26
23
|
execute("mkdir -p ./.contained/#{stack}")
|
27
24
|
|
data/lib/contained/version.rb
CHANGED