allure-report-publisher 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/allure_report_publisher/commands/upload.rb +4 -1
- data/lib/allure_report_publisher/lib/providers/info/_base.rb +1 -0
- data/lib/allure_report_publisher/lib/providers/info/github.rb +1 -1
- data/lib/allure_report_publisher/lib/providers/info/gitlab.rb +1 -1
- data/lib/allure_report_publisher/lib/report_generator.rb +8 -3
- data/lib/allure_report_publisher/lib/uploaders/_uploader.rb +5 -2
- data/lib/allure_report_publisher/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b57fedd5eddc21b48d4c01d4c8858cf4c3c2638d239973a195612fbc14e885f5
|
4
|
+
data.tar.gz: c3745051f24d11bbc89c229aaceddb2c8f4cb97fce2b8e6a8029c0c36099e353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc55ecf458d787dc7813fe08bc8e12459cda59e73eeb8fe2de3ab6b52730382ba8e1af563d0181ac82eb612cc9f684795c4a1921e77b853834c6f7df4e078c45
|
7
|
+
data.tar.gz: 4e134f36135b30fd8e1185ea85091d5d477cb90b95082b606d490dba6fc519d38c6e7d4e5b4ab7ca6f2b656426822c97fc5e510daf1de12153a281a03e914c33
|
data/README.md
CHANGED
@@ -47,6 +47,7 @@ Options:
|
|
47
47
|
--prefix=VALUE # Optional prefix for report path. Required: false
|
48
48
|
--update-pr=VALUE # Add report url to PR via comment or description update. Required: false: (comment/description/actions)
|
49
49
|
--report-title=VALUE # Title for url section in PR comment/description. Required: false, default: "Allure Report"
|
50
|
+
--report-name=VALUE # Custom report name in final Allure report. Required: false
|
50
51
|
--summary=VALUE # Additionally add summary table to PR comment or description. Required: false: (behaviors/suites/packages/total), default: "total"
|
51
52
|
--summary-table-type=VALUE # Summary table type. Required: false: (ascii/markdown), default: "ascii"
|
52
53
|
--base-url=VALUE # Use custom base url instead of default cloud provider one. Required: false
|
@@ -156,6 +157,7 @@ Authentication for PR updates:
|
|
156
157
|
Following environment variables can override default CI values:
|
157
158
|
|
158
159
|
- `ALLURE_JOB_NAME`: overrides default `GITHUB_JOB` value which is used as name for report url section
|
160
|
+
- `ALLURE_RUN_ID`: overrides default `GITHUB_RUN_ID` value which is used as name for the run number
|
159
161
|
|
160
162
|
### allure-publish-action
|
161
163
|
|
@@ -176,6 +178,7 @@ Authentication for MR updates:
|
|
176
178
|
Following environment variables can override default CI values:
|
177
179
|
|
178
180
|
- `ALLURE_JOB_NAME`: overrides default `CI_JOB_NAME` value which is used as name for report url section
|
181
|
+
- `ALLURE_RUN_ID`: overrides default `CI_PIPELINE_ID` value which is used as name for the run number
|
179
182
|
|
180
183
|
In case merge request triggers a downstream pipeline yet you want to update original merge request, overriding following environment variables might be useful:
|
181
184
|
|
@@ -29,6 +29,9 @@ module Publisher
|
|
29
29
|
type: :string,
|
30
30
|
default: "Allure Report",
|
31
31
|
desc: "Title for url section in PR comment/description. Required: false"
|
32
|
+
option :report_name,
|
33
|
+
type: :string,
|
34
|
+
desc: "Custom report name in final Allure report. Required: false"
|
32
35
|
option :summary,
|
33
36
|
type: :string,
|
34
37
|
desc: "Additionally add summary table to PR comment or description. Required: false",
|
@@ -109,7 +112,7 @@ module Publisher
|
|
109
112
|
def uploader
|
110
113
|
@uploader ||= uploaders(args[:type]).new(
|
111
114
|
result_paths: @result_paths,
|
112
|
-
**args.slice(:bucket, :prefix, :base_url, :copy_latest)
|
115
|
+
**args.slice(:bucket, :prefix, :base_url, :copy_latest, :report_name)
|
113
116
|
)
|
114
117
|
end
|
115
118
|
|
@@ -10,8 +10,9 @@ module Publisher
|
|
10
10
|
class ReportGenerator
|
11
11
|
include Helpers
|
12
12
|
|
13
|
-
def initialize(result_paths)
|
13
|
+
def initialize(result_paths, report_name)
|
14
14
|
@result_paths = result_paths.join(" ")
|
15
|
+
@report_name = report_name
|
15
16
|
end
|
16
17
|
|
17
18
|
# Generate allure report
|
@@ -44,14 +45,18 @@ module Publisher
|
|
44
45
|
|
45
46
|
# @return [String] result paths string
|
46
47
|
attr_reader :result_paths
|
48
|
+
# @return [String] custom report name
|
49
|
+
attr_reader :report_name
|
47
50
|
|
48
51
|
# Generate allure report
|
49
52
|
#
|
50
53
|
# @return [void]
|
51
54
|
def generate_report
|
52
55
|
log_debug("Generating allure report")
|
53
|
-
cmd = "allure generate --clean
|
54
|
-
|
56
|
+
cmd = ["allure generate --clean"]
|
57
|
+
cmd << "--report-name '#{report_name}'" if report_name
|
58
|
+
cmd << "--output #{report_path} #{common_info_path} #{result_paths}"
|
59
|
+
out = execute_shell(cmd.join(" "))
|
55
60
|
log_debug("Generated allure report. #{out}".strip)
|
56
61
|
|
57
62
|
deduplicate_executors
|
@@ -30,12 +30,14 @@ module Publisher
|
|
30
30
|
# @option args [String] :prefix
|
31
31
|
# @option args [String] :base_url
|
32
32
|
# @option args [String] :copy_latest
|
33
|
+
# @option args [String] :report_name
|
33
34
|
def initialize(**args)
|
34
35
|
@result_paths = args[:result_paths]
|
35
36
|
@bucket_name = args[:bucket]
|
36
37
|
@prefix = args[:prefix]
|
37
38
|
@base_url = args[:base_url]
|
38
39
|
@copy_latest = ci_info && args[:copy_latest] # copy latest for ci only
|
40
|
+
@report_name = args[:report_name]
|
39
41
|
end
|
40
42
|
|
41
43
|
# Execute allure report generation and upload
|
@@ -94,7 +96,8 @@ module Publisher
|
|
94
96
|
:bucket_name,
|
95
97
|
:prefix,
|
96
98
|
:base_url,
|
97
|
-
:copy_latest
|
99
|
+
:copy_latest,
|
100
|
+
:report_name
|
98
101
|
|
99
102
|
def_delegator :report_generator, :common_info_path
|
100
103
|
|
@@ -155,7 +158,7 @@ module Publisher
|
|
155
158
|
#
|
156
159
|
# @return [Publisher::ReportGenerator]
|
157
160
|
def report_generator
|
158
|
-
@report_generator ||= ReportGenerator.new(result_paths)
|
161
|
+
@report_generator ||= ReportGenerator.new(result_paths, report_name)
|
159
162
|
end
|
160
163
|
|
161
164
|
# Report path prefix
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-report-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.93.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.143.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.93.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.143.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: dry-cli
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
- !ruby/object:Gem::Version
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
|
-
rubygems_version: 3.4.
|
259
|
+
rubygems_version: 3.4.19
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Allure report uploader
|