Class: Tomo::Commands::Deploy
Instance Method Summary
collapse
included
included
included
after_parse, arg, option, parse, parser
enabled?
Instance Method Details
#banner ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tomo/commands/deploy.rb', line 14
def banner
<<~BANNER
Usage: #{green('tomo deploy')} #{yellow('[--dry-run] [options]')}
Sequentially run the "deploy" list of tasks specified in #{DEFAULT_CONFIG_PATH} to
deploy the project to a remote host. Use the #{blue('--dry-run')} option to quickly
simulate the entire deploy without actually connecting to the host. Add the
#{blue('--debug')} option to see an in-depth explanation of the settings and execution
plan that will be used for the deployment.
For a #{DEFAULT_CONFIG_PATH} that specifies distinct environments (e.g. staging,
production), you must specify the target environment using the #{blue('-e')} option. If
you omit this option, tomo will automatically prompt for it.
Tomo will use the settings specified in #{DEFAULT_CONFIG_PATH} to configure the
deploy. You may override these on the command line using #{blue('-s')}. E.g.:
#{blue('tomo deploy -e staging -s git_branch=develop')}
Or use environment variables with the special #{blue('TOMO_')} prefix:
#{blue('TOMO_GIT_BRANCH=develop tomo deploy -e staging')}
Bash completions are provided for tomo’s options. For example, you could type
#{blue('tomo deploy -s <TAB>')} to see a list of all settings, or #{blue('tomo deploy -e pr<TAB>')}
to expand #{blue('pr')} to #{blue('production')}. For bash completion installation instructions,
run #{blue('tomo completion-script')}.
More documentation and examples can be found here:
#{blue('https://tomo.mattbrictson.com/commands/deploy')}
BANNER
end
|
#call(options) ⇒ Object
48
49
50
51
52
53
54
55
|
# File 'lib/tomo/commands/deploy.rb', line 48
def call(options)
logger.info "tomo deploy v#{Tomo::VERSION}"
runtime = configure_runtime(options)
plan = runtime.deploy!
log_completion(plan)
end
|
#summary ⇒ Object
10
11
12
|
# File 'lib/tomo/commands/deploy.rb', line 10
def summary
"Deploy the current project to remote host(s)"
end
|