gina-conveyor 1.0.0 → 1.0.1
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/Gemfile.lock +1 -1
- data/README.md +38 -1
- data/lib/conveyor/version.rb +1 -1
- data/lib/conveyor/workers/syntax.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e36152eec16d715a5fe6b6f75396521adc5061d
|
4
|
+
data.tar.gz: 98ece90ebe918c9f7db4b22ebb8b6ed73ca3ba1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f2be7a86cd0135f534321cfff254af10833bdf69825cba9444a5d21f2c2c8d0032f94ab7d0727e9d3a9d480b1f2ecb902534a22e399e0ef72260a9b32517cb9
|
7
|
+
data.tar.gz: 2588fec637fcd027186d261efd0f8cc5b62f3e7d9b764e37361d5991839b838b9dc87760ebef5415c12edbdeec73fed67a61d7d445271f459202c69bb6f334ab
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@ From source
|
|
15
15
|
git clone https://github.com/gina-alaska/conveyor.git
|
16
16
|
cd conveyor
|
17
17
|
rake install
|
18
|
-
|
18
|
+
|
19
19
|
Usage
|
20
20
|
-----
|
21
21
|
|
@@ -36,6 +36,43 @@ Todo
|
|
36
36
|
3. Finish email notifications
|
37
37
|
4. Add additional cli options
|
38
38
|
|
39
|
+
Worker Commands
|
40
|
+
---------------
|
41
|
+
|
42
|
+
#### `run 'COMMAND', [options]`
|
43
|
+
|
44
|
+
Runs the specified command in a shell
|
45
|
+
|
46
|
+
**Options**
|
47
|
+
* quite (boolean) - suppress any output from the command, default: false
|
48
|
+
* timeout (seconds) - the command stop execution after give number of seconds, default: 600 (10 minutes)
|
49
|
+
|
50
|
+
#### `scp 'FILE', 'DESTINATION', [options]`
|
51
|
+
|
52
|
+
SCP the specified file to a remote DESTINATION. DESTINATION uses the same format as the actual `scp` command.
|
53
|
+
|
54
|
+
**Options**
|
55
|
+
* quite (boolean) - suppress any output from the command, default: false
|
56
|
+
* timeout (seconds) - the command stop execution after give number of seconds, default: 600 (10 minutes)
|
57
|
+
|
58
|
+
**WARNING:** You will need to have ssh/scp'd to the host manually once in order to ensure that the host key and ssh keys are available for this command.
|
59
|
+
|
60
|
+
#### `copy 'FILE', 'DESTINATION'`
|
61
|
+
|
62
|
+
Copy the specified file to DESTINATION. DESTINATION can be a folder or another filename
|
63
|
+
|
64
|
+
### `move 'FILE', 'DESTINATION'`
|
65
|
+
|
66
|
+
Move the specified file to DESTINATION. DESTINATION can be a folder or another filename
|
67
|
+
|
68
|
+
#### `delete 'FILE'`
|
69
|
+
|
70
|
+
Deletes the specified file
|
71
|
+
|
72
|
+
#### `error 'MESSAGE'`, `info 'MESSAGE'`
|
73
|
+
|
74
|
+
Print info out to various log files and consoles
|
75
|
+
|
39
76
|
License
|
40
77
|
-------
|
41
78
|
|
data/lib/conveyor/version.rb
CHANGED
@@ -64,7 +64,7 @@ module Conveyor
|
|
64
64
|
info command unless opts[:quiet]
|
65
65
|
|
66
66
|
begin
|
67
|
-
cmdrunner = Mixlib::ShellOut.new(command, timeout: Conveyor::Foreman.instance.config[:command_timeout] || 600)
|
67
|
+
cmdrunner = Mixlib::ShellOut.new(command, timeout: opts[:timeout] || Conveyor::Foreman.instance.config[:command_timeout] || 600)
|
68
68
|
cmdrunner.run_command()
|
69
69
|
|
70
70
|
info cmdrunner.stdout.chomp unless cmdrunner.stdout.chomp.length == 0
|
@@ -81,9 +81,11 @@ module Conveyor
|
|
81
81
|
|
82
82
|
return !cmdrunner.error!
|
83
83
|
rescue Mixlib::ShellOut::CommandTimeout => e
|
84
|
-
error e.class, "
|
84
|
+
error e.class, e.message, "Command: #{command}"
|
85
|
+
# raise e unless opts[:ignore_error]
|
85
86
|
rescue => e
|
86
87
|
error e.class, e.message, e.backtrace.join("\n")
|
88
|
+
# raise e unless opts[:ignore_error]
|
87
89
|
end
|
88
90
|
end
|
89
91
|
|
@@ -126,8 +128,8 @@ module Conveyor
|
|
126
128
|
|
127
129
|
# Scp files to destination
|
128
130
|
# See: man scp
|
129
|
-
def scp(src, dest)
|
130
|
-
run "scp #{Array.wrap(src).join(' ')} #{dest}"
|
131
|
+
def scp(src, dest, *opts)
|
132
|
+
run "scp #{Array.wrap(src).join(' ')} #{dest}", *opts
|
131
133
|
end
|
132
134
|
end
|
133
135
|
end
|