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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de44c4a9646409b70c951f868cf1f60d753f72f6f14f9c68df242a493033b285
4
- data.tar.gz: e460580a09f0fc0c18261b32d2d3cbaa7420324b938ea1f7a64325cfcaef0759
3
+ metadata.gz: 9cd0f486e60a10bab86075204281d68473e4cb4b68dad6511a8051b3bed42525
4
+ data.tar.gz: 915b6f46f9bc11a54a6b8af80f0029a7d38f21e83c6ceb2e0550bd582e66f14e
5
5
  SHA512:
6
- metadata.gz: b3f08b9ae3eb66e9ca3cf22e2daf4d3091c2ad1b010453b8b6f328151a1d67c0f0174016350a06757f43fc9f2d32b07d198e2967a38648857c52965c50aa3a4c
7
- data.tar.gz: 2c5351508f495084d7b303216047452fd2cd8b13c017ca2b9fedccbe7e26c59bd3f5d955e1124f46f73de3da8c063d6e8044a1961bab1b6fc3ecde92e0531beb
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
@@ -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, :swarm, :init) unless capture(:docker, :info).include?("Swarm: active")
19
+ execute(:docker, :login, "-u", username, "-p", password) if username && password
21
20
 
22
- if username && password
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Contained
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contained
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre