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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb5c2b6dc7b110284945c9d083603b68b39a573b047f82acebd6045a8b88bd79
4
- data.tar.gz: 81fe6d11a19b8040503ccf8a61e620d09fc164a9244423dfff07df89d6f88425
3
+ metadata.gz: 7b42958bc772951cf42ff0866ff1b6817f83a8c7adb27d1bc010d853bed1cf08
4
+ data.tar.gz: 3dbb36855c6252822622e96ce6c793fe2af42ff9d5da5bca7bf7cd6700bdd32e
5
5
  SHA512:
6
- metadata.gz: 478172dea4924daea11efe38ce89c4f4db4a927bb19fa7d686e0038d2392930ec359c28dcd787ba992082c0b5992f491a4f5f351a1b49b5f25b7da7f9a59353d
7
- data.tar.gz: 29484941212d4952364221f72a88cc6f5b3c00600388ee0c3b35579f79ae64876fa4215f5862d6f5736727dfe4b9f1ce117d87dbd879932a41767f072de68f19
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
- file = bucket.file(key(prefix, "history", file_name))
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 '#{file_name}' as '#{file_path}'")
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(report_files.select { |file| file.fnmatch?("*/history/*") }, prefix)
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.to_json)
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: key(prefix, "history", file_name),
70
+ key: source_file,
70
71
  bucket: bucket_name
71
72
  )
72
- log_debug("Downloaded '#{file_name}' as '#{file_path}'")
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(report_files.select { |file| file.fnmatch?("*/history/*") }, prefix)
84
+ upload_to_s3(history_files, prefix)
84
85
  end
85
86
 
86
87
  # Upload allure report
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Publisher
4
- VERSION = "4.7.3"
4
+ VERSION = "4.7.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-report-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.3
4
+ version: 4.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrejs Cunskis