allure-report-publisher 4.7.3 → 4.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/allure_report_publisher/lib/uploaders/_uploader.rb +7 -0
- data/lib/allure_report_publisher/lib/uploaders/gcs.rb +4 -3
- data/lib/allure_report_publisher/lib/uploaders/gitlab_artifacts.rb +1 -1
- data/lib/allure_report_publisher/lib/uploaders/s3.rb +4 -3
- data/lib/allure_report_publisher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b42958bc772951cf42ff0866ff1b6817f83a8c7adb27d1bc010d853bed1cf08
|
4
|
+
data.tar.gz: 3dbb36855c6252822622e96ce6c793fe2af42ff9d5da5bca7bf7cd6700bdd32e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85f21038dff84dbe1a2d0f2ca6ab8045606d0b664d975df2b567f4cb5c532b4d49a979eb6e45afbabd92c475b7a162c71bc42e8076f25494435d906223da2c10
|
7
|
+
data.tar.gz: b7a77a045f429c315772d4e9441d55e03ed451e0ab9c2ff8fe4a9d81a3c39875f51709fc97fe23751804f5527abe2c3dcfe0f14ca5ca5252c9fb5265d34738b9
|
@@ -177,6 +177,13 @@ module Publisher
|
|
177
177
|
.reject(&:directory?)
|
178
178
|
end
|
179
179
|
|
180
|
+
# History files array
|
181
|
+
#
|
182
|
+
# @return [Array<Pathname>]
|
183
|
+
def history_files
|
184
|
+
@history_files ||= report_files.select { |file| file.fnmatch?("*/history/*") }
|
185
|
+
end
|
186
|
+
|
180
187
|
# Get run id
|
181
188
|
#
|
182
189
|
# @return [String]
|
@@ -41,12 +41,13 @@ module Publisher
|
|
41
41
|
def download_history
|
42
42
|
log_debug("Downloading previous run history")
|
43
43
|
HISTORY.each do |file_name|
|
44
|
-
|
44
|
+
source_file = key(prefix, "history", file_name)
|
45
|
+
file = bucket.file(source_file)
|
45
46
|
raise(HistoryNotFoundError, "Allure history from previous runs not found!") unless file
|
46
47
|
|
47
48
|
file_path = path(common_info_path, "history", file_name)
|
48
49
|
file.download(file_path)
|
49
|
-
log_debug("Downloaded '#{
|
50
|
+
log_debug("Downloaded '#{source_file}' to '#{file_path}'")
|
50
51
|
end
|
51
52
|
end
|
52
53
|
|
@@ -55,7 +56,7 @@ module Publisher
|
|
55
56
|
# @return [void]
|
56
57
|
def upload_history
|
57
58
|
log_debug("Uploading report history")
|
58
|
-
upload_to_gcs(
|
59
|
+
upload_to_gcs(history_files, prefix)
|
59
60
|
end
|
60
61
|
|
61
62
|
# Upload allure report
|
@@ -139,7 +139,7 @@ module Publisher
|
|
139
139
|
# this will only work with history json files, see: https://github.com/NARKOZ/gitlab/issues/621
|
140
140
|
response = client.download_job_artifact_file(project_id, job_id, artifact_path)
|
141
141
|
|
142
|
-
File.write(local_path, response.
|
142
|
+
File.write(local_path, response.string)
|
143
143
|
end
|
144
144
|
end
|
145
145
|
end
|
@@ -63,13 +63,14 @@ module Publisher
|
|
63
63
|
def download_history
|
64
64
|
log_debug("Downloading previous run history")
|
65
65
|
HISTORY.each do |file_name|
|
66
|
+
source_file = key(prefix, "history", file_name)
|
66
67
|
file_path = path(common_info_path, "history", file_name)
|
67
68
|
client.get_object(
|
68
69
|
response_target: file_path,
|
69
|
-
key:
|
70
|
+
key: source_file,
|
70
71
|
bucket: bucket_name
|
71
72
|
)
|
72
|
-
log_debug("Downloaded '#{
|
73
|
+
log_debug("Downloaded '#{source_file}' to '#{file_path}'")
|
73
74
|
end
|
74
75
|
rescue Aws::S3::Errors::NoSuchKey
|
75
76
|
raise(HistoryNotFoundError, "Allure history from previous runs not found!")
|
@@ -80,7 +81,7 @@ module Publisher
|
|
80
81
|
# @return [void]
|
81
82
|
def upload_history
|
82
83
|
log_debug("Uploading report history")
|
83
|
-
upload_to_s3(
|
84
|
+
upload_to_s3(history_files, prefix)
|
84
85
|
end
|
85
86
|
|
86
87
|
# Upload allure report
|