Class: Mrsk::Cli::Build
- Inherits:
-
Base
- Object
- Thor
- Base
- Mrsk::Cli::Build
show all
- Defined in:
- lib/mrsk/cli/build.rb
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #initialize
Instance Method Details
#create ⇒ Object
31
32
33
34
35
36
|
# File 'lib/mrsk/cli/build.rb', line 31
def create
run_locally do
debug "Using builder: #{MRSK.builder.name}"
execute *MRSK.builder.create
end
end
|
#deliver ⇒ Object
5
6
7
8
|
# File 'lib/mrsk/cli/build.rb', line 5
def deliver
invoke :push
invoke :pull
end
|
#details ⇒ Object
47
48
49
50
51
52
|
# File 'lib/mrsk/cli/build.rb', line 47
def details
run_locally do
puts "Builder: #{MRSK.builder.name}"
puts capture(*MRSK.builder.info)
end
end
|
#pull ⇒ Object
26
27
28
|
# File 'lib/mrsk/cli/build.rb', line 26
def pull
on(MRSK.hosts) { execute *MRSK.builder.pull }
end
|
#push ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/mrsk/cli/build.rb', line 11
def push
verbose = options[:verbose]
run_locally do
begin
MRSK.verbosity(:debug) { execute *MRSK.builder.push }
rescue SSHKit::Command::Failed => e
error "Missing compatible builder, so creating a new one first"
execute *MRSK.builder.create
MRSK.verbosity(:debug) { execute *MRSK.builder.push }
end
end
end
|
#remove ⇒ Object
39
40
41
42
43
44
|
# File 'lib/mrsk/cli/build.rb', line 39
def remove
run_locally do
debug "Using builder: #{MRSK.builder.name}"
execute *MRSK.builder.remove
end
end
|