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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c809132ae8fef6c18195b73549a756f00e5da6e33a4d4c6ddebcf60c40ded402
4
- data.tar.gz: a5f5b2ad389fcb93c7bb775962080baafe905a7cabc2cd41bce33aec815f87f1
3
+ metadata.gz: 9ad949e526f740ac3c36c3463a462a6040070c698d6faa562204b2a57da5ee46
4
+ data.tar.gz: 44071409e91e41197081a3fafbb9cd73a76a26d2de2be66410e89e9aaec9b627
5
5
  SHA512:
6
- metadata.gz: f7784595322cb89cf26f643582aeae636a3d5fee6efcd574ea7c4122a2609d32e61b193dcddedc90fd4563d9dc972e276960632f67b001711434da404848e190
7
- data.tar.gz: 432c3faf0770e35144d03940c21e4c35b9352090806e0897a941b33c90ea2677aa170d5b6d430862fb3d4a828544002f68483a64ab72e6a219a19e8c7a6d0346
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Harbr
4
- VERSION = "0.1.87"
4
+ VERSION = "0.1.89"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.87
4
+ version: 0.1.89
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke