allure-report-publisher 1.3.0 → 1.4.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 +2 -1
- data/lib/allure_report_publisher/commands/upload.rb +10 -1
- data/lib/allure_report_publisher/lib/uploaders/_uploader.rb +3 -0
- data/lib/allure_report_publisher/lib/uploaders/gcs.rb +1 -1
- data/lib/allure_report_publisher/lib/uploaders/s3.rb +1 -1
- data/lib/allure_report_publisher/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43fbcf0c18cbd23c8e95fcd74bd1fe9719120528ec31d7be73d34c3fb1e2c61c
|
4
|
+
data.tar.gz: eee7966c985bf5841c48f27d82ed43677935c4dd4361dda817e89888f961998a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c10ac6928132f16f6bbf13deca50d22841b489c9dd59edeef5a9c65eea079bf5c7a33c04e215129019d2ca3881e38ecc5f6ebc257ed944e0cade634c0880c31
|
7
|
+
data.tar.gz: 422fda1ca3805877a1c7c720f373a72fa5dce728d56a2ccac2ac842043705ae6a56e9d00e9101ed3a34d5150666d023392982fe846b34b8964589c6a046068b5
|
data/README.md
CHANGED
@@ -49,7 +49,8 @@ Options:
|
|
49
49
|
--update-pr=VALUE # Add report url to PR via comment or description update. Required: false: (comment/description/actions)
|
50
50
|
--summary=VALUE # Additionally add summary table to PR comment or description. Required: false: (behaviors/suites/packages/total)
|
51
51
|
--summary-table-type=VALUE # Summary table type. Required: false: (ascii/markdown), default: :ascii
|
52
|
-
--
|
52
|
+
--base-url=VALUE # Use custom base url instead of default cloud provider one. Required: false
|
53
|
+
--[no-]collapse-summary # Create summary as a collapsible section, default: false
|
53
54
|
--[no-]copy-latest # Keep copy of latest report at base prefix path, default: false
|
54
55
|
--[no-]color # Force color output
|
55
56
|
--[no-]ignore-missing-results # Ignore missing allure results, default: false
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
1
3
|
module Publisher
|
2
4
|
module Commands
|
3
5
|
# Upload allure report
|
@@ -40,10 +42,13 @@ module Publisher
|
|
40
42
|
Publisher::Helpers::Summary::ASCII,
|
41
43
|
Publisher::Helpers::Summary::MARKDOWN
|
42
44
|
]
|
45
|
+
option :base_url,
|
46
|
+
type: :string,
|
47
|
+
desc: "Use custom base url instead of default cloud provider one. Required: false"
|
43
48
|
option :collapse_summary,
|
44
49
|
type: :boolean,
|
45
50
|
default: false,
|
46
|
-
desc: "Create summary as a
|
51
|
+
desc: "Create summary as a collapsible section"
|
47
52
|
option :copy_latest,
|
48
53
|
type: :boolean,
|
49
54
|
default: false,
|
@@ -95,6 +100,7 @@ module Publisher
|
|
95
100
|
**args.slice(
|
96
101
|
:bucket,
|
97
102
|
:prefix,
|
103
|
+
:base_url,
|
98
104
|
:copy_latest,
|
99
105
|
:update_pr,
|
100
106
|
:collapse_summary,
|
@@ -120,6 +126,9 @@ module Publisher
|
|
120
126
|
def validate_args
|
121
127
|
error("Missing argument --results-glob!") unless args[:results_glob]
|
122
128
|
error("Missing argument --bucket!") unless args[:bucket]
|
129
|
+
URI.parse(args[:base_url]) if args[:base_url]
|
130
|
+
rescue URI::InvalidURIError
|
131
|
+
error("Invalid --base-url value!")
|
123
132
|
end
|
124
133
|
|
125
134
|
# Scan for allure results paths
|
@@ -28,6 +28,7 @@ module Publisher
|
|
28
28
|
# @option args [Array] :result_paths
|
29
29
|
# @option args [String] :bucket
|
30
30
|
# @option args [String] :prefix
|
31
|
+
# @option args [String] :base_url
|
31
32
|
# @option args [Boolean] :update_pr
|
32
33
|
# @option args [String] :summary_type
|
33
34
|
# @option args [Symbol] :summary_table_type
|
@@ -37,6 +38,7 @@ module Publisher
|
|
37
38
|
@result_paths = args[:result_paths]
|
38
39
|
@bucket_name = args[:bucket]
|
39
40
|
@prefix = args[:prefix]
|
41
|
+
@base_url = args[:base_url]
|
40
42
|
@update_pr = args[:update_pr]
|
41
43
|
@summary_type = args[:summary_type]
|
42
44
|
@summary_table_type = args[:summary_table_type]
|
@@ -104,6 +106,7 @@ module Publisher
|
|
104
106
|
attr_reader :result_paths,
|
105
107
|
:bucket_name,
|
106
108
|
:prefix,
|
109
|
+
:base_url,
|
107
110
|
:update_pr,
|
108
111
|
:copy_latest,
|
109
112
|
:summary_type,
|
@@ -121,7 +121,7 @@ module Publisher
|
|
121
121
|
# @param [String] path_prefix
|
122
122
|
# @return [String]
|
123
123
|
def url(path_prefix)
|
124
|
-
["https://storage.googleapis.com", bucket_name, path_prefix, "index.html"].compact.join("/")
|
124
|
+
[base_url || "https://storage.googleapis.com", bucket_name, path_prefix, "index.html"].compact.join("/")
|
125
125
|
end
|
126
126
|
end
|
127
127
|
end
|
@@ -132,7 +132,7 @@ module Publisher
|
|
132
132
|
# @param [String] path_prefix
|
133
133
|
# @return [String]
|
134
134
|
def url(path_prefix)
|
135
|
-
["http://#{bucket_name}.s3.amazonaws.com", path_prefix, "index.html"].compact.join("/")
|
135
|
+
[base_url || "http://#{bucket_name}.s3.amazonaws.com", path_prefix, "index.html"].compact.join("/")
|
136
136
|
end
|
137
137
|
end
|
138
138
|
end
|
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: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '0.6'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '1.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.6'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '1.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: faraday-retry
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,14 +222,14 @@ dependencies:
|
|
222
222
|
requirements:
|
223
223
|
- - "~>"
|
224
224
|
- !ruby/object:Gem::Version
|
225
|
-
version: 2.
|
225
|
+
version: 2.20.0
|
226
226
|
type: :development
|
227
227
|
prerelease: false
|
228
228
|
version_requirements: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
230
|
- - "~>"
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version: 2.
|
232
|
+
version: 2.20.0
|
233
233
|
- !ruby/object:Gem::Dependency
|
234
234
|
name: climate_control
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|
@@ -382,14 +382,14 @@ dependencies:
|
|
382
382
|
requirements:
|
383
383
|
- - "~>"
|
384
384
|
- !ruby/object:Gem::Version
|
385
|
-
version: 0.
|
385
|
+
version: 0.48.0
|
386
386
|
type: :development
|
387
387
|
prerelease: false
|
388
388
|
version_requirements: !ruby/object:Gem::Requirement
|
389
389
|
requirements:
|
390
390
|
- - "~>"
|
391
391
|
- !ruby/object:Gem::Version
|
392
|
-
version: 0.
|
392
|
+
version: 0.48.0
|
393
393
|
description: Upload allure reports to different file storage providers
|
394
394
|
email:
|
395
395
|
- andrejs.cunskis@gmail.com
|