harbr 0.1.61 → 0.1.63

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: c1981cd906aad0aa7276bcf5a4000bca22a4c64c60d5c65fb6035938fc4752af
4
- data.tar.gz: d1085ae8703b5f65ebed446d75072886df693d6dfa44c64a1dc7170e8794f059
3
+ metadata.gz: 23cc716ac1aedc9f3bd0128a8e1d56241af336f933f77c87afb88565f7843a58
4
+ data.tar.gz: d2ef42f3f6414833be7a966ab334b2253f783047eb73a8f4690628fe926d63c5
5
5
  SHA512:
6
- metadata.gz: 16cc4ec3fb5e405eaf03c472336913f5be3ae8071aaf95c3379a2bd124219164f8b66588729117c24c2d94508ee4c9f8085b19774c1ab8793956d4fe1b4a7523
7
- data.tar.gz: acd9c634875e20c3b0a8bacc14e4f91ebfc68f6ae799306e481eed2799bdf77d5f228714df79d61f46246b33161b534db62a41b1614f725be055701b1b2e38a1
6
+ metadata.gz: b68fd3136881017c533a35f9c1faa859de11e73898560545d8081a74c588ae244ea056aed6750a9c79f417cb0be93958cf1b43d97e3e42b5fc2b8c3aee5f43d9
7
+ data.tar.gz: e7ed5f67e867797d39396579673c4475558b8ab127ace975f1ad342931b4fdb9a90257ad7cd114117353660b109fe8a35e237e311d94639ea6debf51da242ac9
data/exe/harbr CHANGED
@@ -190,14 +190,10 @@ class HarbrCLI < Thor
190
190
  /versions\/(?<version>\d*)/.match(`ls -l /var/harbr/containers/#{name}/next`)
191
191
  version = $1
192
192
  raise "Ooops! next version not found!" if version.nil?
193
-
194
-
193
+
195
194
  /versions\/(?<version>\d*)/.match(`ls -l /var/harbr/containers/#{name}/current`)
196
195
  `ln -sf /var/harbr/containers/#{name}/version/#{$1} /var/harbr/containers/#{name}/rollback`
197
196
 
198
-
199
- `rm -rf /var/harbr/containers/#{name}/current`
200
-
201
197
  Harbr::Job.perform_async(name, version, "current")
202
198
 
203
199
  puts "deploy current version #{version} of #{name}"
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)
@@ -197,7 +197,7 @@ module Harbr
197
197
  if env == "current"
198
198
 
199
199
  `rm -f /etc/service/#{name}`
200
- `rm -f /var/harbr/containers/#{name}`
200
+ `rm -f /var/harbr/containers/#{name}/current`
201
201
 
202
202
  `ln -sf /var/harbr/containers/#{name}/versions/#{version} /var/harbr/containers/#{name}/current`
203
203
  `ln -sf /etc/sv/harbr/#{name} /etc/service/#{name}`
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.61"
4
+ VERSION = "0.1.63"
5
5
  end
data/lib/harbr.rb CHANGED
@@ -33,13 +33,16 @@ module Harbr
33
33
  puts "Error sending notification: #{e.message}"
34
34
  end
35
35
 
36
- def self.notifiable(name, version)
36
+ def self.notifiable(name, version,env)
37
37
  yield if block_given?
38
- send_notification("Harbr: #{name} deployed successfully", "<p>harbr: #{version} of #{name} deployed successfully</p>")
38
+ send_notification("Harbr: #{env} #{name} deployed successfully", "<p>harbr: #{version} of #{name} deployed successfully</p>")
39
39
  rescue => e
40
- html_content = "<p>Error: #{e.message}</p>
40
+ html_content = <<~HTML
41
+ <p>Error: #{e.message}</p>
41
42
  <p>#{e.backtrace.join("<br>")}</p>
42
- <p>harbr: #{version} of #{name} failed to deploy</p>"
43
+ <p>harbr: #{version} of #{env} #{name} failed to deploy</p>
44
+ HTML
45
+
43
46
  send_notification("Harbr: #{name} failed to deploy", html_content)
44
47
  end
45
48
  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.61
4
+ version: 0.1.63
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