harbr 0.1.45 → 0.1.46
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 +10 -9
- 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: e75e11d319dfb4a27f1d5d0efd248c0c5c12e24400c85fa7c7e31032766a4e66
|
4
|
+
data.tar.gz: 0c05e3ed2b0d8b3e6a8dd3b44bfd0c240078c06eea5636ac583934a66e6ff745
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c02bf3a011c2ea9676e17993fc4153017cfb16f9af25b83e8111afcd3fe8eca219adf1151834a58e356c897338596c315d05b9c02c2edcdcd593238d16c375
|
7
|
+
data.tar.gz: ff6d25776ac6820e3c3e9a781c922354a95c5c8dfbe0c9202d0e5c6e9df0e329de0fa861f6e888b3a835cf95c4524120fd22a577f1d562500bbcfb024b95461a
|
data/exe/harbr
CHANGED
@@ -82,25 +82,26 @@ class HarbrCLI < Thor
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def run_jobs(container, version)
|
85
|
-
|
86
85
|
puts "Running tasks for container: #{container}, version: #{version}"
|
87
86
|
|
88
|
-
if
|
87
|
+
if version.to_i == 0
|
88
|
+
|
89
|
+
Harbr::Job.perform_async(container, version, "current")
|
90
|
+
puts "deploy current version #{version} of #{container}"
|
91
|
+
|
92
|
+
elsif !Dir.exist?("/var/harbr/containers/#{container}/current")
|
89
93
|
check do
|
90
94
|
puts "Waiting for container #{container} manifest to be available..."
|
91
95
|
Dir.exist?("/var/harbr/containers/#{container}/versions/#{version}/config/manifest.yml")
|
92
96
|
end
|
93
97
|
|
94
|
-
Harbr::Job.perform_async(container, version,"current")
|
95
|
-
puts "deploy current version #{version} of #{container}"
|
98
|
+
Harbr::Job.perform_async(container, version, "current")
|
99
|
+
puts "deploy current version #{version} of #{container}"
|
96
100
|
else
|
97
101
|
sleep 3
|
98
|
-
Harbr::Job.perform_async(container, version,"next")
|
99
|
-
puts "deploy next version #{version} of #{container}"
|
102
|
+
Harbr::Job.perform_async(container, version, "next")
|
103
|
+
puts "deploy next version #{version} of #{container}"
|
100
104
|
end
|
101
|
-
|
102
|
-
|
103
|
-
|
104
105
|
end
|
105
106
|
|
106
107
|
def create_traefik_config(containers)
|
data/lib/harbr/job.rb
CHANGED
@@ -99,12 +99,12 @@ module Harbr
|
|
99
99
|
|
100
100
|
def process_container(name, version, port, env, manifest)
|
101
101
|
env_path = "/var/harbr/containers/#{name}/#{env}"
|
102
|
-
system "sv stop #{env}.#{name}" if env ==
|
102
|
+
system "sv stop #{env}.#{name}" if env == "next"
|
103
103
|
|
104
104
|
bundle_install_if_needed(env_path)
|
105
105
|
create_runit_scripts(name, port, env)
|
106
106
|
link_directories(name, version, env)
|
107
|
-
sync_live_data_if_next(name) if env ==
|
107
|
+
sync_live_data_if_next(name) if env == "next"
|
108
108
|
|
109
109
|
containers = collate_containers("#{env}.#{name}", "#{env}.#{manifest.host}", port)
|
110
110
|
create_traefik_config(containers)
|
data/lib/harbr/version.rb
CHANGED