lbhrr 1.0.10 → 1.0.13
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/lbhrr +26 -8
- data/lib/lbhrr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2fde9777acaaf59a7d408201ec6f38c4063b47b94063d7f88717cf99496a0fa
|
4
|
+
data.tar.gz: 8f97b2209dd7a3b2339ce4d04865b5365172af2a7b0de6e2526ce9475d5bf011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83a5dea754b28fa49de722c20f5227b444d733244f5ff69619c4a55a3d5f403f6e99ec2fa3e3c1171bab45f5b5b4f76863c4fd2f44d0cd9197d055b04d3fcdb5
|
7
|
+
data.tar.gz: 921e119077c67a95a686549a853bcd308616d25d81874fea7869eccee45720993849bb8565b1e588b1e216b7f617e88382eddfff037c34958801d434b1885033
|
data/exe/lbhrr
CHANGED
@@ -21,11 +21,11 @@ class LbhrrCLI < Thor
|
|
21
21
|
vendor_path = File.join(Dir.pwd, "vendor")
|
22
22
|
FileUtils.rm_rf(vendor_path) if Dir.exist?(vendor_path)
|
23
23
|
`bundle config set --local path 'vendor/bundle'`
|
24
|
-
|
24
|
+
system "bundle install" or raise "Bundle install failed"
|
25
25
|
# Check if the repository is clean
|
26
26
|
puts "Git repository is dirty, committing changes..."
|
27
|
-
|
28
|
-
|
27
|
+
system("git add .") or raise "Failed to add changes to Git"
|
28
|
+
system("git commit -m 'packaged #{version}'") or raise "Failed to commit changes to Git"
|
29
29
|
puts "Packaging completed successfully."
|
30
30
|
rescue => e
|
31
31
|
puts "Packaging error: #{e.message}"
|
@@ -229,8 +229,7 @@ class LbhrrCLI < Thor
|
|
229
229
|
base_directory = "/var/harbr/containers/#{basename}"
|
230
230
|
versions_directory = "#{base_directory}/versions"
|
231
231
|
destination_path = "#{versions_directory}/#{version}"
|
232
|
-
|
233
|
-
|
232
|
+
|
234
233
|
# Check and create the versions directory on the server
|
235
234
|
`ssh #{user}@#{host} 'mkdir -p #{versions_directory}'`
|
236
235
|
|
@@ -241,8 +240,7 @@ class LbhrrCLI < Thor
|
|
241
240
|
# Rsync files to the new version directory, excluding files as per .gitignore
|
242
241
|
rsync_command = "rsync -avz #{exclude_option} ./ #{user}@#{host}:#{destination_path}"
|
243
242
|
|
244
|
-
if `#{rsync_command}`
|
245
|
-
`ssh #{user}@#{host} 'ln -sfn #{destination_path} #{current_path}'`
|
243
|
+
if `#{rsync_command}`
|
246
244
|
puts "Successfully deployed application version #{version} to #{host}"
|
247
245
|
deployed(local_manifest_path, version)
|
248
246
|
else
|
@@ -258,10 +256,19 @@ class LbhrrCLI < Thor
|
|
258
256
|
config = load_configuration
|
259
257
|
host = config["host"]
|
260
258
|
user = config["user"]
|
261
|
-
exec "ssh #{user}@#{host} 'harbr
|
259
|
+
exec "ssh #{user}@#{host} 'harbr peek #{container_name}'"
|
262
260
|
end
|
263
261
|
|
264
262
|
|
263
|
+
desc "activity", "harbr logs "
|
264
|
+
def activity
|
265
|
+
container_name = File.basename(Dir.pwd)
|
266
|
+
config = load_configuration
|
267
|
+
host = config["host"]
|
268
|
+
user = config["user"]
|
269
|
+
exec "ssh #{user}@#{host} 'harbr logs'"
|
270
|
+
end
|
271
|
+
|
265
272
|
|
266
273
|
desc "hoist", "Deploy an application using the configuration from config/manifest.yml to production"
|
267
274
|
def hoist
|
@@ -273,6 +280,17 @@ class LbhrrCLI < Thor
|
|
273
280
|
puts `ssh #{user}@#{host} 'harbr deploy #{name}'`
|
274
281
|
end
|
275
282
|
|
283
|
+
desc "rollback", "rollback an application using the configuration from config/manifest.yml"
|
284
|
+
def rollback
|
285
|
+
config = load_configuration
|
286
|
+
host = config["host"]
|
287
|
+
user = config["user"]
|
288
|
+
name = config["name"]
|
289
|
+
|
290
|
+
puts `ssh #{user}@#{host} 'harbr rollback #{name}'`
|
291
|
+
end
|
292
|
+
|
293
|
+
|
276
294
|
def self.exit_on_failure?
|
277
295
|
true
|
278
296
|
end
|
data/lib/lbhrr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lbhrr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delaney Kuldvee Burke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|