Class: Publisher::Uploaders::GitlabArtifacts
- Extended by:
- Forwardable
- Defined in:
- lib/allure_report_publisher/lib/uploaders/gitlab_artifacts.rb
Overview
Uploads artifacts to GitLab
Constant Summary collapse
- DEFAULT_PAGES_DOMAIN =
"gitlab.io".freeze
Constants inherited from Uploader
Uploader::EXECUTOR_JSON, Uploader::HISTORY
Instance Method Summary collapse
-
#initialize(**args) ⇒ GitlabArtifacts
constructor
A new instance of GitlabArtifacts.
-
#report_url ⇒ String
Report url.
-
#upload ⇒ void
No-op method as gitlab does not expose api to upload artifacts.
Methods inherited from Uploader
#generate_report, #report_urls
Methods included from Helpers
allure_cli?, colorize, debug_io, #env, #env_int, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!
Constructor Details
#initialize(**args) ⇒ GitlabArtifacts
Returns a new instance of GitlabArtifacts.
10 11 12 13 14 15 |
# File 'lib/allure_report_publisher/lib/uploaders/gitlab_artifacts.rb', line 10 def initialize(**args) super # gitlab artifacts do not support having url to latest report @copy_latest = false end |
Instance Method Details
#report_url ⇒ String
Report url
20 21 22 |
# File 'lib/allure_report_publisher/lib/uploaders/gitlab_artifacts.rb', line 20 def report_url @report_url ||= "#{pages_hostname}/-/#{project_name}/-/jobs/#{job_id}/artifacts/#{report_path}/index.html" end |
#upload ⇒ void
This method returns an undefined value.
No-op method as gitlab does not expose api to upload artifacts
27 28 29 |
# File 'lib/allure_report_publisher/lib/uploaders/gitlab_artifacts.rb', line 27 def upload raise("Gitlab artifacts does not support upload operation! Report upload must be configured in the CI job.") end |