harbr 0.1.62 → 0.1.64
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 +1 -1
- data/lib/harbr/version.rb +1 -1
- data/lib/harbr.rb +9 -4
- metadata +1 -2
- data/! +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e4ffc612a6071dbdcf8e99394a48b01a351465cc90f00634bce0e4f13d6ddd0
|
4
|
+
data.tar.gz: 5121456431ace3ccc24eaebdb5ff7709eec161f528cdef9e7cdd97e014b090f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9494606ac0cf2c7d53a5da678d398b55db574ae4841ae6ac612557dd2a9ebf717b9e4d786c6d519955edb9536d91c737fa9bcba048603f216faae8688b0f0a
|
7
|
+
data.tar.gz: 41a1c84ae3753d2d73f098e22ee40c9b25736db1c4b382c14fd3268c0ed18cc0663a6eb42fb5dec4359e481d2f853844ac49f2a12399ce9e26a7a874c45bb2bb
|
data/lib/harbr/job.rb
CHANGED
@@ -76,7 +76,7 @@ module Harbr
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def perform(name, version, env)
|
79
|
-
Harbr.notifiable(name, version) do
|
79
|
+
Harbr.notifiable(name, version,env) do
|
80
80
|
manifest = load_manifest(name, version)
|
81
81
|
port = `port assign #{env}.#{manifest.port}`.strip
|
82
82
|
process_container(name,version,port,env,manifest)
|
data/lib/harbr/version.rb
CHANGED
data/lib/harbr.rb
CHANGED
@@ -30,16 +30,21 @@ module Harbr
|
|
30
30
|
|
31
31
|
Resend::Emails.send(params)
|
32
32
|
rescue => e
|
33
|
+
puts "Error: #{e.class}"
|
34
|
+
puts "backtrace: #{e.backtrace.join('\n')}"
|
33
35
|
puts "Error sending notification: #{e.message}"
|
34
36
|
end
|
35
37
|
|
36
|
-
def self.notifiable(name, version)
|
38
|
+
def self.notifiable(name, version,env)
|
37
39
|
yield if block_given?
|
38
|
-
send_notification("Harbr: #{name} deployed successfully", "<p>harbr: #{version} of #{name} deployed successfully</p>")
|
40
|
+
send_notification("Harbr: #{env} #{name} deployed successfully", "<p>harbr: #{version} of #{name} deployed successfully</p>")
|
39
41
|
rescue => e
|
40
|
-
html_content =
|
42
|
+
html_content = <<~HTML
|
43
|
+
<p>Error: #{e.message}</p>
|
41
44
|
<p>#{e.backtrace.join("<br>")}</p>
|
42
|
-
<p>harbr: #{version} of #{name} failed to deploy</p>
|
45
|
+
<p>harbr: #{version} of #{env} #{name} failed to deploy</p>
|
46
|
+
HTML
|
47
|
+
|
43
48
|
send_notification("Harbr: #{name} failed to deploy", html_content)
|
44
49
|
end
|
45
50
|
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.
|
4
|
+
version: 0.1.64
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delaney Kuldvee Burke
|
@@ -132,7 +132,6 @@ executables:
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
|
-
- "!"
|
136
135
|
- ".data/development/Harbr::Port.dir"
|
137
136
|
- ".data/development/Harbr::Port.pag"
|
138
137
|
- ".rspec"
|
data/!
DELETED
@@ -1,51 +0,0 @@
|
|
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
|