Class: Publisher::Uploaders::Uploader
- Inherits:
-
Object
- Object
- Publisher::Uploaders::Uploader
- Extended by:
- Forwardable
- Includes:
- Helpers
- Defined in:
- lib/allure_report_publisher/lib/uploaders/_uploader.rb
Overview
Uploader implementation
Constant Summary collapse
- EXECUTOR_JSON =
"executor.json".freeze
- HISTORY =
[ "categories-trend.json", "duration-trend.json", "history-trend.json", "history.json", "retry-trend.json" ].freeze
Instance Method Summary collapse
-
#execute ⇒ void
Execute allure report generation and upload.
-
#generate_report ⇒ void
Generate allure report.
-
#initialize(**args) ⇒ Uploader
constructor
Uploader instance.
-
#report_url ⇒ String
Report url.
-
#report_urls ⇒ Hash<String, String>
Uploaded report urls.
-
#upload ⇒ void
Upload report to storage provider.
Methods included from Helpers
allure_cli?, colorize, debug_io, #env, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!
Constructor Details
#initialize(**args) ⇒ Uploader
Uploader instance
33 34 35 36 37 38 39 40 41 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 33 def initialize(**args) @result_paths = args[:result_paths] @bucket_name = args[:bucket] @prefix = args[:prefix] @base_url = args[:base_url] @copy_latest = ci_info && args[:copy_latest] # copy latest for ci only @report_name = args[:report_name] @parallel = args[:parallel] end |
Instance Method Details
#execute ⇒ void
This method returns an undefined value.
Execute allure report generation and upload
46 47 48 49 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 46 def execute generate_report upload end |
#generate_report ⇒ void
This method returns an undefined value.
Generate allure report
54 55 56 57 58 59 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 54 def generate_report add_history add_executor_info report_generator.generate end |
#report_url ⇒ String
Report url
85 86 87 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 85 def report_url raise("Not Implemented!") end |
#report_urls ⇒ Hash<String, String>
Uploaded report urls
73 74 75 76 77 78 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 73 def report_urls urls = { "Report url" => report_url } urls["Latest report url"] = latest_report_url if copy_latest urls end |
#upload ⇒ void
This method returns an undefined value.
Upload report to storage provider
64 65 66 67 68 |
# File 'lib/allure_report_publisher/lib/uploaders/_uploader.rb', line 64 def upload upload_history unless !run_id || copy_latest upload_report upload_latest_copy if copy_latest end |