harbr 0.0.99 → 0.0.101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/harbr +2 -2
- data/lib/harbr/container.rb +1 -1
- data/lib/harbr/job.rb +1 -0
- data/lib/harbr/next/job.rb +8 -14
- 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: c1b0d736611f71d1f376882c03ea536faf2405ffca07be97f0c893e7f39dbd40
|
4
|
+
data.tar.gz: fecba1d996d65db0e6e1e9a93a8360c84eaea30071a2386036a47faddbcd5100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1c0756b84b18ce019d4628d77e2c50c3c289082f9bb374bf2dc82c78b7fc383562a4f0341d4abbec07d942a795ce3e11a93fae34835103e375b4a007371d91e
|
7
|
+
data.tar.gz: 33b768b79aa12303da9ba3aa94ddfad7cfcfebac8a03bd6f50303221e2a82e45f2863599457a04047e28cb4131684ef9e93ed14ff279fbaf7bca718e8d553305
|
data/exe/harbr
CHANGED
@@ -7,10 +7,10 @@ class HarbrCLI < Thor
|
|
7
7
|
return puts "No containers available." if containers.empty?
|
8
8
|
|
9
9
|
# Define headers based on Container attributes
|
10
|
-
headers = ["Name", "Host Header", "IP", "Port"]
|
10
|
+
headers = ["Name", "Host Header", "IP", "Port", "Current Version", "Next Version", "Previous Version"]
|
11
11
|
|
12
12
|
rows = containers.map do |container|
|
13
|
-
[container.name, container.host_header, container.ip.nil? ? "127.0.0.1" : container.ip, container.port]
|
13
|
+
[container.name, container.host_header, container.ip.nil? ? "127.0.0.1" : container.ip, container.port.to_s, container.current_version, container.next_version, container.previous_version]
|
14
14
|
end
|
15
15
|
|
16
16
|
table = ::Terminal::Table.new(headings: headers, rows: rows)
|
data/lib/harbr/container.rb
CHANGED
data/lib/harbr/job.rb
CHANGED
data/lib/harbr/next/job.rb
CHANGED
@@ -50,22 +50,16 @@ module Harbr
|
|
50
50
|
puts "Traefik configuration written to /etc/traefik/harbr.toml"
|
51
51
|
end
|
52
52
|
|
53
|
-
def collate_containers(name,
|
53
|
+
def collate_containers(name,port, version)
|
54
54
|
|
55
55
|
containers = Harbr::Container::Repository.new
|
56
|
-
container = containers.
|
56
|
+
container = containers.find_by_name(name)
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
container.port = port
|
64
|
-
containers.create(container)
|
65
|
-
else
|
66
|
-
container.port = port
|
67
|
-
containers.update(container)
|
68
|
-
end
|
58
|
+
container.port = port
|
59
|
+
container.next_version = version
|
60
|
+
container.previous_version = container.current_version
|
61
|
+
containers.update(container)
|
62
|
+
|
69
63
|
containers.all
|
70
64
|
end
|
71
65
|
|
@@ -201,7 +195,7 @@ module Harbr
|
|
201
195
|
system "ln -sf /etc/sv/harbr/#{name}/next /etc/service/next.#{name}"
|
202
196
|
system "sv restart next.#{name}"
|
203
197
|
|
204
|
-
containers = collate_containers("next.#{name}",
|
198
|
+
containers = collate_containers("next.#{name}",port,version)
|
205
199
|
create_traefik_config(containers)
|
206
200
|
end
|
207
201
|
|
data/lib/harbr/version.rb
CHANGED