Skip to content

Commit

Permalink
ALLURE_JOB_NAME (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
bamanczak authored Jan 22, 2024
1 parent 0c3594d commit 3a02ec8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
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

0 comments on commit 3a02ec8

Please sign in to comment.