harbr 0.1.87 → 0.1.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harbr/job.rb +18 -1
- 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: 9ad949e526f740ac3c36c3463a462a6040070c698d6faa562204b2a57da5ee46
|
4
|
+
data.tar.gz: 44071409e91e41197081a3fafbb9cd73a76a26d2de2be66410e89e9aaec9b627
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adbee78fc8dc6d2c173558b43bcb8a8cb82c1d39d5780dfcb5bde8bdfab03537d47aac351b29c5e5115ef6f100cba5b8843163e7162ea8cc904080bee64f75eb
|
7
|
+
data.tar.gz: bec90083bdda3c8ae75f9645d628824e5aa6866bfdaa81223cf65e618afab0f495873bd5bf21d4d6fd99c7b4d583e3dd3b60c839717e89f1bfd6fe608877e0c4
|
data/lib/harbr/job.rb
CHANGED
@@ -42,7 +42,7 @@ module Harbr
|
|
42
42
|
def collate_containers(name, host, port, host_header_aliases = [])
|
43
43
|
containers = Harbr::Container::Repository.new
|
44
44
|
container = containers.find_by_header(host)
|
45
|
-
|
45
|
+
|
46
46
|
if container.nil?
|
47
47
|
container = Harbr::Container.new
|
48
48
|
container.name = name
|
@@ -56,14 +56,26 @@ module Harbr
|
|
56
56
|
containers.update(container)
|
57
57
|
end
|
58
58
|
|
59
|
+
|
59
60
|
if host_header_aliases
|
60
61
|
host_header_aliases.each do |host_header_alias|
|
62
|
+
|
61
63
|
container = Harbr::Container.new
|
62
64
|
container.name = "#{name} -> #{host_header_alias}"
|
63
65
|
container.host_header = host_header_alias
|
64
66
|
container.ip = "127.0.0.1"
|
65
67
|
container.port = port
|
66
68
|
containers.create(container) unless containers.find_by_header(host_header_alias)
|
69
|
+
|
70
|
+
if(container.name.starts_with?("live"))
|
71
|
+
container = Harbr::Container.new
|
72
|
+
container.name = "#{name} -> #{host_header_alias.gsub("live","")}"
|
73
|
+
container.host_header = host_header_alias.gsub("live","")
|
74
|
+
container.ip = "127.0.0.1"
|
75
|
+
container.port = port
|
76
|
+
containers.create(container) unless containers.find_by_header(host_header_alias)
|
77
|
+
end
|
78
|
+
|
67
79
|
end
|
68
80
|
end
|
69
81
|
|
@@ -137,6 +149,11 @@ module Harbr
|
|
137
149
|
`ln -sf /var/harbr/containers/#{name}/versions/#{version} /var/harbr/containers/#{name}/live`
|
138
150
|
end
|
139
151
|
|
152
|
+
if env == "next"
|
153
|
+
`rm -f /var/harbr/containers/#{name}/next` if Dir.exist?("/var/harbr/containers/#{name}/next")
|
154
|
+
`ln -sf /var/harbr/containers/#{name}/versions/#{version} /var/harbr/containers/#{name}/next`
|
155
|
+
end
|
156
|
+
|
140
157
|
bundle_install_if_needed(version_path)
|
141
158
|
|
142
159
|
create_runit_scripts(name, port, env)
|
data/lib/harbr/version.rb
CHANGED