harbr 0.1.75 → 0.1.77
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/exe/harbr +2 -2
- data/lib/harbr/container.rb +4 -1
- data/lib/harbr/job.rb +2 -2
- data/lib/harbr/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: 5a4a2abcb20f4f5f4cda10bb5119ba0ea4ede93c124bb3ce019ab96a6bc82724
|
4
|
+
data.tar.gz: a03482d061a02ce738c000835c36aa9c1e26445b5fdb7122fe0c76ea0d5f8363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb0a4411bb91dec67b9ba5e327d12eb8c2b5a477c06b6817134b10eeb75243e2629e80875966a6b12e4c932543c5ae0dc6d63eed856d736deebaa8ab136f428
|
7
|
+
data.tar.gz: f2d9e8d7401b33e42576a4daeb47bd828de5336bf86a99dc3f1f940813cd1394a88e051811ee5843b93907e0c667de247260c7b1a4528410aa60b1fc58e84275
|
data/exe/harbr
CHANGED
@@ -134,12 +134,12 @@ class HarbrCLI < Thor
|
|
134
134
|
container_repo = Harbr::Container::Repository.new
|
135
135
|
|
136
136
|
[name, "next.#{name}"].each do |container_name|
|
137
|
-
|
138
|
-
if container
|
137
|
+
container_repo.get_by_name(container_name).each do |container|
|
139
138
|
`port release #{container.port}`
|
140
139
|
puts "released port #{container.port} successfully."
|
141
140
|
container_repo.delete(container)
|
142
141
|
end
|
142
|
+
end
|
143
143
|
|
144
144
|
`rm -rf /etc/service/#{container_name}`
|
145
145
|
`rm -rf /etc/sv/harbr/#{container_name}`
|
data/lib/harbr/container.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Harbr
|
2
2
|
class Container
|
3
3
|
include Dddr::Entity
|
4
|
-
attr_accessor :name, :host_header, :ip, :port
|
4
|
+
attr_accessor :name, :host_header, :ip, :port
|
5
5
|
|
6
6
|
queries do
|
7
7
|
def find_by_header(host_header)
|
@@ -11,6 +11,9 @@ module Harbr
|
|
11
11
|
def find_by_name(name)
|
12
12
|
all.find { |container| container.name.downcase == name.downcase }
|
13
13
|
end
|
14
|
+
def get_by_name(name)
|
15
|
+
all.select { |container| container.name.downcase.include? name.downcase }
|
16
|
+
end
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/harbr/job.rb
CHANGED
@@ -139,8 +139,8 @@ module Harbr
|
|
139
139
|
link_directories(name, version, env)
|
140
140
|
sync_live_data_if_next(name) if env == "next"
|
141
141
|
|
142
|
-
containers = collate_containers("#{name}", "#{manifest.host}", port,manifest.
|
143
|
-
containers = collate_containers("#{env}.#{name}", "#{env}.#{manifest.host}", port,manifest.
|
142
|
+
containers = collate_containers("#{name}", "#{manifest.host}", port,manifest.host_aliases) if env == "current"
|
143
|
+
containers = collate_containers("#{env}.#{name}", "#{env}.#{manifest.host}", port,manifest.host_aliases&.map{|host| "#{env}.#{host}" }) if env == "next"
|
144
144
|
|
145
145
|
create_traefik_config(containers)
|
146
146
|
|
data/lib/harbr/version.rb
CHANGED