harbr 0.1.59 → 0.1.61
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/! +51 -0
- data/lib/harbr/job.rb +11 -7
- data/lib/harbr/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1981cd906aad0aa7276bcf5a4000bca22a4c64c60d5c65fb6035938fc4752af
|
|
4
|
+
data.tar.gz: d1085ae8703b5f65ebed446d75072886df693d6dfa44c64a1dc7170e8794f059
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16cc4ec3fb5e405eaf03c472336913f5be3ae8071aaf95c3379a2bd124219164f8b66588729117c24c2d94508ee4c9f8085b19774c1ab8793956d4fe1b4a7523
|
|
7
|
+
data.tar.gz: acd9c634875e20c3b0a8bacc14e4f91ebfc68f6ae799306e481eed2799bdf77d5f228714df79d61f46246b33161b534db62a41b1614f725be055701b1b2e38a1
|
data/!
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
release 0.1.60
|
|
2
|
+
|
|
3
|
+
add logging and fix finisg script
|
|
4
|
+
# Please enter the commit message for your changes. Lines starting
|
|
5
|
+
# with '#' will be ignored, and an empty message aborts the commit.
|
|
6
|
+
#
|
|
7
|
+
# On branch main
|
|
8
|
+
# Your branch is up to date with 'origin/main'.
|
|
9
|
+
#
|
|
10
|
+
# Changes to be committed:
|
|
11
|
+
# modified: lib/harbr/job.rb
|
|
12
|
+
# modified: lib/harbr/version.rb
|
|
13
|
+
#
|
|
14
|
+
# ------------------------ >8 ------------------------
|
|
15
|
+
# Do not modify or remove the line above.
|
|
16
|
+
# Everything below it will be ignored.
|
|
17
|
+
diff --git a/lib/harbr/job.rb b/lib/harbr/job.rb
|
|
18
|
+
index 747fa75..6ece813 100644
|
|
19
|
+
--- a/lib/harbr/job.rb
|
|
20
|
+
+++ b/lib/harbr/job.rb
|
|
21
|
+
@@ -169,15 +169,18 @@ module Harbr
|
|
22
|
+
`chmod +x /etc/sv/harbr/#{name}/#{env}/run`
|
|
23
|
+
`chmod +x /etc/sv/harbr/#{name}/#{env}/finish`
|
|
24
|
+
`chmod +x /etc/sv/harbr/#{name}/#{env}/log/run`
|
|
25
|
+
+ `mkdir -p /var/log/harbr/#{name}/#{env}`
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if env == "current"
|
|
29
|
+
write_to_file "/etc/sv/harbr/#{name}/run", run_script
|
|
30
|
+
write_to_file "/etc/sv/harbr/#{name}/log/run", log_script
|
|
31
|
+
- write_to_file "/etc/sv/harbr/#{name}/log/finish", finish_script
|
|
32
|
+
+ write_to_file "/etc/sv/harbr/#{name}/finish", finish_script
|
|
33
|
+
`chmod +x /etc/sv/harbr/#{name}/run`
|
|
34
|
+
`chmod +x /etc/sv/harbr/#{name}/finish`
|
|
35
|
+
`chmod +x /etc/sv/harbr/#{name}/log/run`
|
|
36
|
+
+ `mkdir -p /var/log/harbr/#{name}`
|
|
37
|
+
+
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
diff --git a/lib/harbr/version.rb b/lib/harbr/version.rb
|
|
42
|
+
index 89cc745..88176bf 100644
|
|
43
|
+
--- a/lib/harbr/version.rb
|
|
44
|
+
+++ b/lib/harbr/version.rb
|
|
45
|
+
@@ -1,5 +1,5 @@
|
|
46
|
+
# frozen_string_literal: true
|
|
47
|
+
|
|
48
|
+
module Harbr
|
|
49
|
+
- VERSION = "0.1.59"
|
|
50
|
+
+ VERSION = "0.1.60"
|
|
51
|
+
end
|
data/lib/harbr/job.rb
CHANGED
|
@@ -123,8 +123,8 @@ module Harbr
|
|
|
123
123
|
|
|
124
124
|
version_path = "/var/harbr/containers/#{name}/versions/#{version}"
|
|
125
125
|
|
|
126
|
-
system "sv stop #{env}.#{name}" if env == "next"
|
|
127
|
-
system "sv stop #{name}" if env == "current"
|
|
126
|
+
#system "sv stop #{env}.#{name}" if env == "next"
|
|
127
|
+
#system "sv stop #{name}" if env == "current"
|
|
128
128
|
|
|
129
129
|
bundle_install_if_needed(version_path)
|
|
130
130
|
|
|
@@ -137,8 +137,8 @@ module Harbr
|
|
|
137
137
|
|
|
138
138
|
create_traefik_config(containers)
|
|
139
139
|
|
|
140
|
-
system "sv
|
|
141
|
-
system "sv
|
|
140
|
+
system "sv restart #{env}.#{name}" if env == "next"
|
|
141
|
+
system "sv restart #{name}" if env == "current"
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
@@ -169,15 +169,18 @@ module Harbr
|
|
|
169
169
|
`chmod +x /etc/sv/harbr/#{name}/#{env}/run`
|
|
170
170
|
`chmod +x /etc/sv/harbr/#{name}/#{env}/finish`
|
|
171
171
|
`chmod +x /etc/sv/harbr/#{name}/#{env}/log/run`
|
|
172
|
+
`mkdir -p /var/log/harbr/#{name}/#{env}`
|
|
172
173
|
end
|
|
173
174
|
|
|
174
175
|
if env == "current"
|
|
175
176
|
write_to_file "/etc/sv/harbr/#{name}/run", run_script
|
|
176
177
|
write_to_file "/etc/sv/harbr/#{name}/log/run", log_script
|
|
177
|
-
write_to_file "/etc/sv/harbr/#{name}/
|
|
178
|
+
write_to_file "/etc/sv/harbr/#{name}/finish", finish_script
|
|
178
179
|
`chmod +x /etc/sv/harbr/#{name}/run`
|
|
179
180
|
`chmod +x /etc/sv/harbr/#{name}/finish`
|
|
180
181
|
`chmod +x /etc/sv/harbr/#{name}/log/run`
|
|
182
|
+
`mkdir -p /var/log/harbr/#{name}`
|
|
183
|
+
|
|
181
184
|
end
|
|
182
185
|
|
|
183
186
|
|
|
@@ -222,21 +225,22 @@ module Harbr
|
|
|
222
225
|
exec 2>&1
|
|
223
226
|
cd /var/harbr/containers/#{@container_name}/#{@env}
|
|
224
227
|
exec ./exe/run #{@port} #{@env}
|
|
228
|
+
echo "started #{@container_name} on port #{@port}"
|
|
225
229
|
SCRIPT
|
|
226
230
|
end
|
|
227
231
|
|
|
228
232
|
def finish_script
|
|
229
233
|
<<~SCRIPT
|
|
230
234
|
#!/bin/sh
|
|
231
|
-
sleep 1
|
|
232
235
|
lsof -i :#{@port} | awk 'NR!=1 {print $2}' | xargs kill
|
|
233
|
-
|
|
236
|
+
echo "killed #{@container_name} on port #{@port}"
|
|
234
237
|
SCRIPT
|
|
235
238
|
end
|
|
236
239
|
|
|
237
240
|
def log_script
|
|
238
241
|
<<~SCRIPT
|
|
239
242
|
#!/bin/sh
|
|
243
|
+
echo "starting log for #{@container_name} on port #{@port}"
|
|
240
244
|
exec svlogd -tt /var/log/harbr/#{@container_name}/#{@env}/
|
|
241
245
|
SCRIPT
|
|
242
246
|
end
|
data/lib/harbr/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.1.61
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Delaney Kuldvee Burke
|
|
@@ -132,6 +132,7 @@ executables:
|
|
|
132
132
|
extensions: []
|
|
133
133
|
extra_rdoc_files: []
|
|
134
134
|
files:
|
|
135
|
+
- "!"
|
|
135
136
|
- ".data/development/Harbr::Port.dir"
|
|
136
137
|
- ".data/development/Harbr::Port.pag"
|
|
137
138
|
- ".rspec"
|