Class: Publisher::Commands::Upload

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Helpers
Defined in:
lib/allure_report_publisher/commands/upload.rb

Overview

Upload allure report

Constant Summary collapse

STORAGE_PROVIDERS =
%w[gcs s3 gitlab-artifacts].freeze

Instance Method Summary collapse

Methods included from Helpers

allure_cli?, colorize, debug_io, #env, #env_int, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!

Instance Method Details

#call(args: [], **arguments) ⇒ Object



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/allure_report_publisher/commands/upload.rb', line 96

def call(args: [], **arguments)
  Helpers.pastel(force_color: arguments[:color])
  @args = arguments

  validate_args!
  scan_results_paths

  generate_report(args)
  upload_report
  return unless arguments[:update_pr] && Providers.info&.pr?

  add_report_urls
rescue StandardError => e
  handle_error(e)
end