jenkins_pipeline_builder 0.16.3 → 1.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
  SHA1:
3
- metadata.gz: 41dc0d9576d352f3f72f889129316b891bdbc708
4
- data.tar.gz: cedc1fe5236054eefbf76f3593a0d48bde21a905
3
+ metadata.gz: 1b4ed8e1fdf73907f2ff1299661b53c5f3f9c7c5
4
+ data.tar.gz: e0a9a769e290a3daf806e06e28d217c095921563
5
5
  SHA512:
6
- metadata.gz: deb2cc501e9cc121693014a6a89a4007bdd9a1a2ea08be7ecfd6cf5258054161a13c54db699da607ca23265511edc5bf143cc293a0e16b4c54c1085985d41db0
7
- data.tar.gz: 473375c07f0b0c8d12f7d45d667463d5eab935e78a5271f255bef7f9f834a9f4806a485840accdb07f22ca0997aee1ed0ae5f18a26e32fd8d73fe5dc6a968b24
6
+ metadata.gz: a64b280c805686de28ac128f15b688816caa7617e26519133d2e69eb68cf4957be7b1e2c04871f33cfce12a4079af5c08129ce1e5938ac52a5f26671e240c69c
7
+ data.tar.gz: f1d4bb4e5e27fb73b334e565ff7dab95c78e5f62e7badd9f1567d3f7c59780548227a895a702e74156a1540c31057cc5e22f514ad81c0bfa4c23e99ec4b4ab75
@@ -549,3 +549,19 @@ publisher do
549
549
  end
550
550
  end
551
551
  end
552
+
553
+ # https://github.com/hawknewton/jenkins-github-pull-request-notifier
554
+ publisher do
555
+ name :pull_request_notifier
556
+ plugin_id 'github-pull-request-notifier'
557
+ description 'Push build results to a github issue/pull request'
558
+ jenkins_name 'Github Pull Request Notifier'
559
+ announced false
560
+
561
+ xml do |params|
562
+ send('jenkins.plugins.github__pull__request__notifier.GithubPullRequestNotifier') do
563
+ pullRequestNumber params[:pull_request_number]
564
+ groupRepo params[:group_repo]
565
+ end
566
+ end
567
+ end
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = '0.16.3'.freeze
24
+ VERSION = '1.0.0'.freeze
25
25
  end
@@ -221,6 +221,27 @@ describe 'publishers' do
221
221
  end
222
222
  end
223
223
 
224
+ context 'pull_request_notifier' do
225
+ before :each do
226
+ allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
227
+ list_installed: { 'github-pull-request-notifier' => '0.0.3' }
228
+ )
229
+ end
230
+ it 'generates a configuration' do
231
+ params = { publishers: { pull_request_notifier: { pull_request_number: '5', group_repo: 'test/me' } } }
232
+
233
+ JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
234
+
235
+ publisher = @n_xml.root.children.first
236
+ expect(publisher.name).to match 'jenkins.plugins.github__pull__request__notifier.GithubPullRequestNotifier'
237
+
238
+ expect(publisher.children[0].name).to eq 'pullRequestNumber'
239
+ expect(publisher.children[0].content).to eq '5'
240
+ expect(publisher.children[1].name).to eq 'groupRepo'
241
+ expect(publisher.children[1].content).to eq 'test/me'
242
+ end
243
+ end
244
+
224
245
  context 'git' do
225
246
  it 'generates a configuration'
226
247
  end
@@ -29,6 +29,7 @@ PUBLISHERS = {
29
29
  performance_plugin: ['0'],
30
30
  post_build_script: ['0'],
31
31
  publish_tap_results: ['0'],
32
+ pull_request_notifier: ['0'],
32
33
  sonar_result: ['0'],
33
34
  xunit: ['0']
34
35
  }.freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins_pipeline_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Moochnick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-10 00:00:00.000000000 Z
12
+ date: 2016-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri