dry-stack 0.1.42 → 0.1.44

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: 81c2e3581d9fa3ff1a403971a708092d90ca88a4cba67f31120eeb1c88b4548b
4
+ data.tar.gz: 66cbe1cf50ec838072d6cb18a3ba4d1e7003179ca60e1112adc2635d365b80a3
5
5
  SHA512:
6
- metadata.gz: 37489df96d4c410f66ee95e0abdd6b53050269371a9d83064ec9d378f8ee207562e1c675753960a4d00eedfc2d2ef60939c90e84496dd335568a84dbe376c881
7
- data.tar.gz: e4a4a30e184fdcb6ae90597ae64cb5e703a4ee93589fea8629765941b77f2055eab7d65c67ab756d094440cc35781a32ed083dfca0f7ec2f7a3c61ab855cb8bd
6
+ metadata.gz: 8f2d226fc707c356691a056c898a782f94975b7386c6aae081665a730760f1e62f29d2a5b5e8a4e9cd468c1c340d3203187b68bd7abaa771c8a15a32de63a6b0
7
+ data.tar.gz: 62b6edeaee0c109f11181f841fc7bd0c667e0260a7f09c23a28f503f0f5c4f441aa2e3ccada171986b28d47806a87759f36856b3a2edecfd19c0c5e104a1404b
@@ -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
@@ -190,7 +190,7 @@ module Dry
190
190
 
191
191
  if ing[:host_sni]
192
192
  domain = opts[:tls_domain] || 'example.com'
193
- domain = ing[:host_sni].gsub('.*', ".#{domain}")
193
+ domain = ing[:host_sni].gsub('.*', ".#{domain}") if ing[:host_sni]&.include?('*')
194
194
  domain = ing[:tls_domain] if ing[:tls_domain]
195
195
 
196
196
  ing[:passthrough] = false unless ing.key? :passthrough
@@ -218,7 +218,7 @@ module Dry
218
218
 
219
219
  if opts[:traefik_tls]
220
220
  domain = opts[:tls_domain] || 'example.com'
221
- domain = ing[:host].gsub('.*', ".#{domain}") if ing[:host]
221
+ domain = ing[:host].gsub('.*', ".#{domain}") if ing[:host]&.include?('*')
222
222
  domain = ing[:tls_domain] if ing[:tls_domain]
223
223
  service[:deploy][:labels] += [
224
224
  "traefik.http.routers.#{service_name}-#{index}.tls=true",
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.44'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom B
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-03 00:00:00.000000000 Z
11
+ date: 2025-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake