allure-report-publisher 1.8.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4115ac96bf1ba67b88667f692f4d679badba58b771446fc6b31d814aee152367
4
- data.tar.gz: 4d3b7cf9834063ee9ccac56bcb1c81fe0b690a369929230255b7715106b43bc2
3
+ metadata.gz: 38bbaf350b80722c5f23f0abc4ee8e4d6de18559041859d47235bfc1df9afa76
4
+ data.tar.gz: d96fed3494c775fb3bc2ead62ebf8764e5d7374071c398663d987ef75eaf3a78
5
5
  SHA512:
6
- metadata.gz: f904533b0677eeb3222689567663e26c828d6f14410a91cb87b031dc5b66b83db3c71becc56049c7ff43f3ea6c09f14800544e8530134aad0283a8a34b66179d
7
- data.tar.gz: 4cab5ad6c6965715e8a1a33a47cbe040bab2724f57225a3d7cd7fc99e7c1e8499f9eef7d8a4f671dc19468d988077f43b64fbaee77e1956ac9da95f8629f1519
6
+ metadata.gz: b040c46dc3a9d10de59a104e0146c8be976c7c3ac50799a67c35b449eb16d341bb3fb72c2627d2ec77eb69b317b563e8509cf529e54bedc0a1a358539b50ad96
7
+ data.tar.gz: 7043096ee2e3ff7ab81cd58259580f866533ce6e63e9d371772c93a4d30ccf34df06d82eb9f692e4ec7382640c769656e809439e8169bb52781743d934224fd0
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  ![Workflow status](https://github.com/andrcuns/allure-report-publisher/workflows/Test/badge.svg)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/210eaa4f74588fb08313/maintainability)](https://codeclimate.com/github/andrcuns/allure-report-publisher/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/210eaa4f74588fb08313/test_coverage)](https://codeclimate.com/github/andrcuns/allure-report-publisher/test_coverage)
8
- [![Known Vulnerabilities](https://snyk.io/test/github/andrcuns/allure-report-publisher/badge.svg)](https://snyk.io/test/github/andrcuns/allure-report-publisher)
9
8
  [![Test Report](https://img.shields.io/badge/report-allure-blue.svg)](https://storage.googleapis.com/allure-test-reports/allure-report-publisher/refs/heads/main/index.html)
10
9
 
11
10
  Upload your report to a file storage of your choice.
@@ -65,7 +64,7 @@ Examples:
65
64
 
66
65
  ## Environment variables
67
66
 
68
- All named options can be configured via environment variables. Environment variables are prefixed with `ALLURE_REPORT_` and uppercased.
67
+ All named options can be configured via environment variables. Environment variables are prefixed with `ALLURE_` and uppercased.
69
68
 
70
69
  Example: `--results-glob` can be configured via `ALLURE_REPORT_RESULTS_GLOB`
71
70
 
@@ -188,6 +187,10 @@ If reporter is executed with options `--update-pr=comment` and `--unresolved-dis
188
187
 
189
188
  - `ALLURE_FAILURE_ALERT_COMMENT`: comment added to create unresolved discussion note, default: `There are some test failures that need attention`
190
189
 
190
+ ### CI/CD catalog resource
191
+
192
+ [allure-report-publisher CI/CD catalog resource](https://gitlab.com/andrcuns/allure-report-publisher) can be used to easily integrate report publishing in to Gitlab CI pipelines.
193
+
191
194
  # Development
192
195
 
193
196
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -5,6 +5,8 @@ module Dry
5
5
  module Parser
6
6
  class InvalidEnvValue < StandardError; end
7
7
 
8
+ ENV_VAR_PREFIX = "ALLURE_".freeze
9
+
8
10
  class << self
9
11
  def call(command, arguments, prog_name)
10
12
  original_arguments = arguments.dup
@@ -44,15 +46,21 @@ module Dry
44
46
  end.compact
45
47
  end
46
48
 
47
- def option_from_env(option) # rubocop:disable Metrics/CyclomaticComplexity
48
- name = "ALLURE_REPORT_#{option.name.to_s.upcase}"
49
+ def option_from_env(option)
50
+ name = "#{ENV_VAR_PREFIX}#{option.name.to_s.upcase}"
49
51
  value = ENV[name]
50
52
  return if value.nil? || value.empty?
51
53
  return if option.boolean? && !%w[true false].include?(value)
52
- raise(InvalidEnvValue, "#{name} contains invalid value: '#{value}'") if option.values&.none?(value)
53
54
 
55
+ validate_accepted_values(option, value)
54
56
  option.boolean? ? value == "true" : value
55
57
  end
58
+
59
+ def validate_accepted_values(option, value)
60
+ return unless option.values&.none? { |v| v.to_s == value }
61
+
62
+ raise(InvalidEnvValue, "#{name} contains invalid value: '#{value}'")
63
+ end
56
64
  end
57
65
  end
58
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Publisher
4
- VERSION = "1.8.0"
4
+ VERSION = "2.0.0"
5
5
  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.8.0
4
+ version: 2.0.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: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2023-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3