Class: Jiminy::CLI

Inherits:
Thor
  • Object
show all
Includes:
Reporting::CIProviders, Thor::Actions
Defined in:
lib/jiminy/cli.rb,
lib/jiminy/cli/exit_codes/base.rb,
lib/jiminy/cli/exit_codes/success.rb,
lib/jiminy/cli/exit_codes/process_timeout.rb,
lib/jiminy/cli/exit_codes/pipeline_not_found.rb,
lib/jiminy/cli/exit_codes/workflow_not_found.rb,
lib/jiminy/cli/exit_codes/workflow_not_success.rb

Defined Under Namespace

Modules: ExitCodes

Constant Summary collapse

MAX_TIMEOUT_SECONDS =
1800
POLL_INTERVAL_SECONDS =
60

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/jiminy/cli.rb', line 20

def self.exit_on_failure?
  false
end

Instance Method Details

#initObject



50
51
52
# File 'lib/jiminy/cli.rb', line 50

def init
  template("config.rb", "./config/jiminy.rb")
end

#reportObject



39
40
41
42
43
44
45
46
47
# File 'lib/jiminy/cli.rb', line 39

def report
  self.start_time = Time.now
  artifact_urls = artifacts.map(&:url)
  Jiminy::Reporting.report!(*artifact_urls,
    pr_number: options[:pr_number],
    dry_run: options[:dry_run])

  finish(ExitCodes::Success)
end