Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an option to use custom ALLURE_RUN_ID #632

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Authentication for PR updates:
Following environment variables can override default CI values:

- `ALLURE_JOB_NAME`: overrides default `GITHUB_JOB` value which is used as name for report url section
- `ALLURE_RUN_ID`: overrides default `GITHUB_RUN_ID` value which is used as name for the run number

### allure-publish-action

Expand All @@ -176,6 +177,7 @@ Authentication for MR updates:
Following environment variables can override default CI values:

- `ALLURE_JOB_NAME`: overrides default `CI_JOB_NAME` value which is used as name for report url section
- `ALLURE_RUN_ID`: overrides default `CI_PIPELINE_ID` value which is used as name for the run number

In case merge request triggers a downstream pipeline yet you want to update original merge request, overriding following environment variables might be useful:

Expand Down
1 change: 1 addition & 0 deletions lib/allure_report_publisher/lib/providers/info/_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Info
#
class Base
ALLURE_JOB_NAME = "ALLURE_JOB_NAME".freeze
ALLURE_RUN_ID = "ALLURE_RUN_ID".freeze

# :nocov:

Expand Down
2 changes: 1 addition & 1 deletion lib/allure_report_publisher/lib/providers/info/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def pr?
#
# @return [String]
def run_id
@run_id ||= env("GITHUB_RUN_ID")
@run_id ||= env(ALLURE_RUN_ID) || env("GITHUB_RUN_ID")
end

# Server url
Expand Down
2 changes: 1 addition & 1 deletion lib/allure_report_publisher/lib/providers/info/gitlab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def pr?
#
# @return [String]
def run_id
@run_id ||= ENV["CI_PIPELINE_ID"]
@run_id ||= env(ALLURE_RUN_ID) || ENV["CI_PIPELINE_ID"]
end

# Server url
Expand Down
Loading