jenkins_pipeline_builder 0.9.2 → 0.9.3

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzRlOGU5YTJiYmNlMTI3MjgyNjkzYWJlY2E1ZDRiYTM2ZGE0MDBlYw==
4
+ MWE4MTc4M2I3NTdlOGI5MDVmYWE5Mjc1YjkwYTczNjljZGQyNzlmMw==
5
5
  data.tar.gz: !binary |-
6
- ZjViYWJiYjNiZGVmZGMwZTBlN2ExMTdkMWMxZmVhOGRiNjNhNzExNg==
6
+ OTQ4OTI0NTIxMjJjYWRiODI4ZDczNjZkYzFkMzQzNTQyM2QzMTEwMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTliYWU4ZjIwNTQyZTdiZjU2OTI4NmQwOTIxMjQ4ZDE2OWI0ODEyNzc5YTZk
10
- NTI3MjkwNWY0M2JkMDA3MzNiYTcwNGM1ZWI3MWUwODVjOGUyYjFmMzg0YjIx
11
- OWEzOGY5ODUzNjVmYjM4Y2U1YjMzZWE2NDFkYTFhYzEzMjRkMmQ=
9
+ MmM2N2FiMGViNjlmOGZjYTFiMTA1Y2I4MDJkMTg1MGQ4ODc4YmE4N2JmNjIx
10
+ NWZmZDkyNjFhY2E2MDQwM2RlNzRhMmNiNTdiODIwNzA5MzFlOWU0NmRkYWQ5
11
+ NmUyM2ExZTY2YWUwNWUwZjE1NDAwMmEzZDE5MGRlNjhjNThjYjU=
12
12
  data.tar.gz: !binary |-
13
- MjU1ZDYzMjBmZmQ0ZDZmNDY3ZjZmMTg0YTlkMGI3OTQxZGU3NjYzYjU5ZTFl
14
- YTQwMDQ4Mjk2ZjhkNTJiY2QwMmY2NmI0YmNmNzcyZWNhZjI2M2FiNmUwNTE0
15
- NTVhNTg4ZGMwZjAzMDhhNzEzOTExYTJjNzE3ODk1ZGRlODVjMTc=
13
+ NTA2ZjJmY2Y3NzdjYjc0NjJjMmMzMGVjZTg1NzEyNjYzZGYwMzlkZDEwOTA0
14
+ ZGZiODg2NTg3OTE4OTNkNjM2N2M4YWYyYjFjNThlYTA3ZjljZTg3N2JmMTMz
15
+ ZTIxN2QyZDE1NmMwNjdhNjE1YTFjOTdkN2U0Yzc0NDBiY2FhOTE=
@@ -116,6 +116,7 @@ job_attribute do
116
116
 
117
117
  version '2.0' do
118
118
  parameters [
119
+ :changelog_to_branch,
119
120
  :credentials_id,
120
121
  :excluded_regions,
121
122
  :excluded_users,
@@ -147,6 +148,17 @@ job_attribute do
147
148
  doGenerateSubmoduleConfigurations false
148
149
  submoduleCfg
149
150
  extensions do
151
+ if params[:changelog_to_branch]
152
+ opts = params[:changelog_to_branch]
153
+ fail 'remote and branch are required for changelog_to_branch' unless opts[:remote] && opts[:branch]
154
+ send('hudson.plugins.git.extensions.impl.ChangelogToBranch') do
155
+ options do
156
+ compareRemote opts[:remote]
157
+ compareTarget opts[:branch]
158
+ end
159
+ end
160
+
161
+ end
150
162
  send('hudson.plugins.git.extensions.impl.WipeWorkspace') if params[:wipe_workspace]
151
163
  if params[:local_branch]
152
164
  send('hudson.plugins.git.extensions.impl.LocalBranch') do
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = '0.9.2'
24
+ VERSION = '0.9.3'
25
25
  end
@@ -108,6 +108,10 @@ describe 'job_attributes' do
108
108
  it 'sets all the options' do
109
109
  params = {
110
110
  scm_params: {
111
+ changelog_to_branch: {
112
+ remote: 'origin',
113
+ branch: 'pr-1'
114
+ },
111
115
  local_branch: :local,
112
116
  recursive_update: true,
113
117
  excluded_users: :exclude_me,
@@ -126,6 +130,8 @@ describe 'job_attributes' do
126
130
 
127
131
  scm_config = @n_xml.xpath('//scm').first
128
132
 
133
+ expect(scm_config.css('compareRemote').first).to be_truthy
134
+ expect(scm_config.css('compareTarget').first).to be_truthy
129
135
  expect(scm_config.css('disableSubmodules').first).to be_truthy
130
136
  expect(scm_config.css('recursiveSubmodules').first).to be_truthy
131
137
  expect(scm_config.css('trackingSubmodules').first).to be_truthy
@@ -138,6 +144,8 @@ describe 'job_attributes' do
138
144
  scm_config.xpath('//scm/extensions/hudson.plugins.git.extensions.impl.WipeWorkspace').first
139
145
  ).to_not be_nil
140
146
 
147
+ expect(scm_config.css('compareRemote').first.content).to eq 'origin'
148
+ expect(scm_config.css('compareTarget').first.content).to eq 'pr-1'
141
149
  expect(scm_config.css('disableSubmodules').first.content).to eq 'false'
142
150
  expect(scm_config.css('recursiveSubmodules').first.content).to eq 'true'
143
151
  expect(scm_config.css('trackingSubmodules').first.content).to eq 'false'
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.9.2
4
+ version: 0.9.3
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: 2014-11-11 00:00:00.000000000 Z
12
+ date: 2014-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri