gitlab-qa 6.13.0 → 6.14.0

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: '0692b909c3bf06d12d5f0846dc3296b93755d0c58c5969a71773e9664b298a8c'
4
- data.tar.gz: 3aac312bb7b6dd2244d92b9bbf9ce1ecf561c65caae723abca625b155c00cfa4
3
+ metadata.gz: 79cd3084cf93dc40c0935800fd13991f2b8e057fd08aca2b91cffddc776675c3
4
+ data.tar.gz: 0ad9aecd55123681543e84b7ff2150ec8d4a0f004374dd43cd7ced64a89b11f9
5
5
  SHA512:
6
- metadata.gz: 05c3a6b9ad1eec8d6adf2892ae3b90568bbfebc7f7def626126ae2b14da9be902b71edd8d45a7c98a3cb89b596fa6cee6b352da159f7e3ae1ca2daf8b37dc176
7
- data.tar.gz: 4554af9b7849516651be2e5f32f4fd5d57690b4af2787292d4b18e6a8838fad92201a9d101edcbc9c2391327322fdaca96a37393fe6ea1a3111f734be7934d2f
6
+ metadata.gz: 29b7032d6ad65269e2aa27d03bea3bff2805bd160550c69fefd08475bb60ad5160c2417422e58b2b29d1ef4c2c31d3ebc6661cb0cbb151522dedb6dda97e64d7
7
+ data.tar.gz: 16d5d8ae03e4542c7518e1466723eee32e927a523890c3d56c565df2cabd363a180116a2d4db5d2eefd323dadb355f1471c7d7da9a0fcff61eb13f607a174b95
@@ -60,24 +60,30 @@ module Gitlab
60
60
  end
61
61
 
62
62
  def generate_failed_jobs_listing
63
+ failed_jobs = []
64
+
65
+ client = Gitlab.client(
66
+ endpoint: Runtime::Env.ci_api_v4_url,
67
+ private_token: Runtime::Env.gitlab_ci_api_token)
68
+
63
69
  gitlab.handle_gitlab_client_exceptions do
64
- failed_jobs = Gitlab.pipeline_jobs(
70
+ failed_jobs = client.pipeline_jobs(
65
71
  Runtime::Env.ci_project_id,
66
72
  Runtime::Env.ci_pipeline_id,
67
73
  scope: 'failed')
74
+ end
68
75
 
69
- listings = failed_jobs.map do |job|
70
- allowed_to_fail = ' (allowed to fail)' if job.allow_failure
76
+ listings = failed_jobs.map do |job|
77
+ allowed_to_fail = ' (allowed to fail)' if job.allow_failure
71
78
 
72
- "* [#{job.name}](#{job.web_url})#{allowed_to_fail}"
73
- end.join("\n")
79
+ "* [#{job.name}](#{job.web_url})#{allowed_to_fail}"
80
+ end.join("\n")
74
81
 
75
- <<~MARKDOWN.chomp if failed_jobs.any?
76
- ## Failed jobs
82
+ <<~MARKDOWN.chomp if failed_jobs.any?
83
+ ## Failed jobs
77
84
 
78
- #{listings}
79
- MARKDOWN
80
- end
85
+ #{listings}
86
+ MARKDOWN
81
87
  end
82
88
 
83
89
  def generate_stages_listing(tests)
@@ -116,6 +116,14 @@ module Gitlab
116
116
  ENV['GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN']
117
117
  end
118
118
 
119
+ def gitlab_ci_api_token
120
+ ENV['GITLAB_CI_API_TOKEN']
121
+ end
122
+
123
+ def ci_api_v4_url
124
+ ENV['CI_API_V4_URL']
125
+ end
126
+
119
127
  def ci_job_name
120
128
  ENV['CI_JOB_NAME']
121
129
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module QA
3
- VERSION = '6.13.0'.freeze
3
+ VERSION = '6.14.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.13.0
4
+ version: 6.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Bizon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-29 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control