dry-stack 0.1.42 → 0.1.43

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: 7ced600ae3db4576db39a7492a2926d075253fcd921b8a059950928634511457
4
- data.tar.gz: ac7720bdbc7b6b3b34a8dcd147eb397f08b7829464cc950974d769bfc1bb56e0
3
+ metadata.gz: 5ee28483702d068eb62990c00e7447bb99d0350ccc78600b485e986829df2a82
4
+ data.tar.gz: c0d912f9aced3405fc8bfb517283b6ec6092d3fa037be7db03366bffead6a0dc
5
5
  SHA512:
6
- metadata.gz: 37489df96d4c410f66ee95e0abdd6b53050269371a9d83064ec9d378f8ee207562e1c675753960a4d00eedfc2d2ef60939c90e84496dd335568a84dbe376c881
7
- data.tar.gz: e4a4a30e184fdcb6ae90597ae64cb5e703a4ee93589fea8629765941b77f2055eab7d65c67ab756d094440cc35781a32ed083dfca0f7ec2f7a3c61ab855cb8bd
6
+ metadata.gz: fa739cf6cab7b0e38726b82b36aa4b1e660cdea1dc5b2406d0992489f92f242fa17a4fbf597d953d67c7d97d3a9f5d2599733a05492713ef59554897af857392
7
+ data.tar.gz: fbf16fac58fead0736b3eaf7a22d5b52327f214064498be2097662d96f6e7fcc2b0224100ab53763456fe1392c0b033767c7d032b52bb27f9b370bf4e3a8eb30
@@ -58,8 +58,8 @@ Dry::CommandLine::COMMANDS[:swarm_deploy] = Class.new do
58
58
  exec_i "docker --context #{name} config create #{stack.name}_readme -", stack.description
59
59
  deploy_status = 'deployed'
60
60
  ensure
61
- if ENV['DEPLOY_REGISTRY'] || ENV['CI_DEPLOY_REGISTRY']
62
- deploy_registry = ENV['DEPLOY_REGISTRY'] || ENV['CI_DEPLOY_REGISTRY']
61
+ if ENV['CI_DEPLOY_REGISTRY']
62
+ deploy_registry = ENV['CI_DEPLOY_REGISTRY']
63
63
  puts "Sending deploy status to #{deploy_registry}"
64
64
  data = {
65
65
  deploy_host: endpoint,
@@ -70,16 +70,20 @@ Dry::CommandLine::COMMANDS[:swarm_deploy] = Class.new do
70
70
  stack: YAML.load(yaml, aliases: true)
71
71
  }
72
72
 
73
- uri = URI("#{deploy_registry}/api/v1/swarm_deploy")
74
- http = Net::HTTP.new(uri.host, uri.port)
75
- http.use_ssl = uri.scheme == 'https'
73
+ begin
74
+ uri = URI("#{deploy_registry}/api/v1/swarm_deploy")
75
+ http = Net::HTTP.new(uri.host, uri.port)
76
+ http.use_ssl = uri.scheme == 'https'
76
77
 
77
- request = Net::HTTP::Post.new(uri)
78
- request['Content-Type'] = 'application/json'
79
- request.body = data.to_json
78
+ request = Net::HTTP::Post.new(uri)
79
+ request['Content-Type'] = 'application/json'
80
+ request.body = data.to_json
80
81
 
81
- response = http.request(request)
82
- puts "POST Return value: #{response.code}"
82
+ response = http.request(request)
83
+ puts "POST Return value: #{response.code}"
84
+ rescue => e
85
+ puts "Error: #{e.message}"
86
+ end
83
87
  end
84
88
  end
85
89
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.1.42'
3
+ VERSION = '0.1.43'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.42
4
+ version: 0.1.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B