harbr 0.0.80 → 0.0.82
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/lib/harbr/job.rb +2 -16
- data/lib/harbr/next/job.rb +1 -20
- 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: d1e6917d2f26c5e1bbecbccf6fae440750a6aa6122add836527318cd4dd76d30
|
4
|
+
data.tar.gz: 72a41fc3e526b57ce6fa029b0fd46a6821c6608f880f070971a0092038666c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7010e30a615b6b876630875744c3b56f4aafceb31506c86ff20e9a07c1593d75fd5e4ad07cce0543ae1c068aafccc9db3848572a50a0ad5db7d1b9f15c684ed
|
7
|
+
data.tar.gz: 5ce94ff7548ccd37336bf2626499810d9fde3b581df7bcf2fa54d372d7e4a1748337021eeb5c12aa7e447cfff809ad666e371edd40a34233cc03f662db6d8094
|
data/lib/harbr/job.rb
CHANGED
@@ -12,21 +12,7 @@ module Harbr
|
|
12
12
|
File.basename(path)
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
file_path = '/var/harbr/.data/processed_next.txt' # replace with your file path
|
17
|
-
`touch #{file_path}`
|
18
|
-
container_version = "#{name},#{version}"
|
19
|
-
|
20
|
-
File.open(file_path, 'r') do |file|
|
21
|
-
if file.any? { |line| line.chomp == container_version }
|
22
|
-
puts 'containerised'
|
23
|
-
else
|
24
|
-
result = yield name, version
|
25
|
-
File.write(file_path, "#{container_version}\n", mode: 'a') unless result == false
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
15
|
+
|
30
16
|
def create_traefik_config(containers)
|
31
17
|
config = {
|
32
18
|
"http" => {
|
@@ -181,7 +167,7 @@ module Harbr
|
|
181
167
|
Dir.chdir "/var/harbr/containers/#{name}/versions/#{version}" do
|
182
168
|
`bundle config set --local path 'vendor/bundle'`
|
183
169
|
manifest = load_manifest(name, version)
|
184
|
-
port = `port assign
|
170
|
+
port = `port assign #{manifest.port}`.strip
|
185
171
|
system "sv stop #{name}"
|
186
172
|
system 'bundle install'
|
187
173
|
`mkdir -p /etc/sv/harbr/#{name}`
|
data/lib/harbr/next/job.rb
CHANGED
@@ -17,20 +17,6 @@ module Harbr
|
|
17
17
|
File.basename(path)
|
18
18
|
end
|
19
19
|
|
20
|
-
def check_container_version(name, version)
|
21
|
-
file_path = '/var/harbr/.data/processed_next.txt' # replace with your file path
|
22
|
-
`touch #{file_path}`
|
23
|
-
container_version = "#{name},#{version}"
|
24
|
-
|
25
|
-
File.open(file_path, 'r') do |file|
|
26
|
-
if file.any? { |line| line.chomp == container_version }
|
27
|
-
puts 'containerised'
|
28
|
-
else
|
29
|
-
result = yield name, version
|
30
|
-
File.write(file_path, "#{container_version}\n", mode: 'a') unless result == false
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
20
|
|
35
21
|
def create_traefik_config(containers)
|
36
22
|
config = {
|
@@ -184,12 +170,7 @@ module Harbr
|
|
184
170
|
|
185
171
|
def perform(name, version)
|
186
172
|
`bundle config set --local path 'vendor/bundle'`
|
187
|
-
|
188
|
-
container_path = "/var/harbr/containers/#{name}/versions/#{version}"
|
189
|
-
latest_version = highest_numbered_directory("#{container_path}/versions")
|
190
|
-
|
191
|
-
version = get_container_name(latest_version)
|
192
|
-
name = get_container_name(container_path)
|
173
|
+
|
193
174
|
manifest = load_manifest(name,version)
|
194
175
|
current_path = "/var/harbr/containers/#{name}/versions/#{version}"
|
195
176
|
|
data/lib/harbr/version.rb
CHANGED