jenkins_pipeline_builder 0.8.2 → 0.8.3

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: 02c5a6f146ee6cbc2d05531f77ab5e29115586af
4
- data.tar.gz: c299f2a21aee7479f12397e19b395314d0a651cc
3
+ metadata.gz: bae42ffc2c7d06e86083d864ec4fb115b6de1882
4
+ data.tar.gz: 02795c251581e89b537e405a9fa5e8ff1f4fb8bd
5
5
  SHA512:
6
- metadata.gz: 741140017fddf92b7cb19d4b5aaf8bf8f12d8e851f3665f6bb27571355a452f74c76408bcc7ee0b3037bcd69dcaf9d09bcf43f5c87e4c9fd5167567100ae63c9
7
- data.tar.gz: 2f4f027d1cf4ae672c022fba30499a8c45368156ca1e63721280e8c26489eed2f605b06629e1a75bb7062d678b5d084def9897a1c97e5619c302c12a19b22ea6
6
+ metadata.gz: ad10374e5f18248de8b191179ca873a5c9da2b775e0b7be05df2ccd82635f4927faa09c9831fc41e29f767b7e98a67c9d9be80c59e25c7a00fa62ed1fc67ab55
7
+ data.tar.gz: 32641c8b0912e2aacc456b63b2c537c8ed0857bcb20f7c7fe3a76a9db86e3fef99490ed643cb036f36c66d69e8a75461bbf2ab51a74dcf9df7a6914c6c9f504a
data/README.md CHANGED
@@ -121,6 +121,9 @@ Here's a high level overview of what's available:
121
121
  shell_command: '. commit_build.sh'
122
122
  inject_env_vars_pre_scm:
123
123
  file: '${PARENT_WORKSPACE}/{{shared_job_settings_file}}'
124
+ promoted_builds:
125
+ - 'Stage Promotion'
126
+ - 'Prod Promotion'
124
127
  hipchat:
125
128
  room: room name here
126
129
  start-notify: true
@@ -276,6 +279,9 @@ Here's a high level overview of what's available:
276
279
  }
277
280
  ```
278
281
 
282
+ NOTE: The *promoted_builds* plugin is not fully implemented. This plugin just helps you point to the jobs that you have in order to promote your build.
283
+ You need to manually create your promotion rules. Using this plugin will help you regenerate your jobs without breaking your manual promotion jobs.
284
+
279
285
  ### Pull Request Generator
280
286
 
281
287
  The pull request generator will generate pipelines for pull requests that are noticed on your repo. It will also remove old pipelines from Jenkins if the pull_request is closed.
@@ -344,3 +344,18 @@ job_attribute do
344
344
  end
345
345
  end
346
346
  end
347
+ job_attribute do
348
+ name :promoted_builds
349
+ plugin_id 'promoted-builds'
350
+ description 'This plugin makes it possible to promote builds to upper environments.'
351
+ jenkins_name 'Promote builds to by a manual approval process.'
352
+ announced false
353
+
354
+ xml path: '//properties' do |params|
355
+ send('hudson.plugins.promoted__builds.JobPropertyImpl') do
356
+ activeProcessNames do
357
+ params.each { |v| string v }
358
+ end
359
+ end
360
+ end
361
+ end
@@ -260,7 +260,7 @@ publisher do
260
260
  mavenOpts
261
261
  jobAdditionalProperties
262
262
  mavenInstallationName params[:maven_installation_name] || ''
263
- rootPom
263
+ rootPom params[:root_pom] || ''
264
264
  settings class: 'jenkins.mvn.DefaultSettingsProvider'
265
265
  globalSettings class: 'jenkins.mvn.DefaultGlobalSettingsProvider'
266
266
  usePrivateRepository false
@@ -202,3 +202,17 @@ wrapper do
202
202
  end
203
203
  end
204
204
  end
205
+
206
+ wrapper do
207
+ name :nodejs
208
+ plugin_id 'nodejs'
209
+ description 'Provides Jenkins integration for NodeJS & npm packages.'
210
+ jenkins_name 'Node Plugin'
211
+ announced false
212
+
213
+ xml do |wrapper|
214
+ send('jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper') do
215
+ nodeJSInstallationName wrapper[:node_installation_name]
216
+ end
217
+ end
218
+ end
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = '0.8.2'
24
+ VERSION = '0.8.3'
25
25
  end
@@ -59,6 +59,17 @@ describe 'publishers' do
59
59
  maven_installation_name = sonar_nodes.select { |node| node.name == 'mavenInstallationName' }
60
60
  expect(maven_installation_name.first.content).to match 'test'
61
61
  end
62
+
63
+ it 'populates root pom' do
64
+ params = { publishers: { sonar_result: { root_pom: 'project_war/pom.xml' } } }
65
+
66
+ JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
67
+
68
+ sonar_nodes = @n_xml.root.children.first.children
69
+ root_pom = sonar_nodes.select { |node| node.name == 'rootPom' }
70
+ expect(root_pom.first.content).to match 'project_war/pom.xml'
71
+ end
72
+
62
73
  end
63
74
 
64
75
  context 'description_setter' do
@@ -59,4 +59,19 @@ describe 'wrappers' do
59
59
  end
60
60
  end
61
61
 
62
+ context 'nodejs' do
63
+ before :each do
64
+ JenkinsPipelineBuilder.registry.registry[:job][:wrappers][:nodejs].installed_version = '0.0'
65
+ end
66
+
67
+ it 'generates correct xml' do
68
+ params = { wrappers: { nodejs: { node_installation_name: 'Node-0.10.24' } } }
69
+ JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
70
+
71
+ node_path = '//buildWrappers/jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper/nodeJSInstallationName'
72
+ node = @n_xml.root.xpath(node_path)
73
+ expect(node.first.content).to match 'Node-0.10.24'
74
+ end
75
+ end
76
+
62
77
  end
@@ -65,7 +65,8 @@ describe JenkinsPipelineBuilder::ModuleRegistry do
65
65
  throttle: ['0'],
66
66
  prepare_environment: ['0'],
67
67
  concurrent_build: ['0'],
68
- inject_env_vars_pre_scm: ['0']
68
+ inject_env_vars_pre_scm: ['0'],
69
+ promoted_builds: ['0']
69
70
  }
70
71
  registry = JenkinsPipelineBuilder.registry.registry
71
72
  # There are 4 sub types so, we don't count those
@@ -108,7 +109,8 @@ describe JenkinsPipelineBuilder::ModuleRegistry do
108
109
  inject_passwords: ['0'],
109
110
  inject_env_var: ['0'],
110
111
  artifactory: ['0'],
111
- maven3artifactory: ['0']
112
+ maven3artifactory: ['0'],
113
+ nodejs: ['0']
112
114
  }
113
115
  registry = JenkinsPipelineBuilder.registry.registry
114
116
  expect(registry[:job][:wrappers].size).to eq wrappers.size
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.8.2
4
+ version: 0.8.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-09-29 00:00:00.000000000 Z
12
+ date: 2014-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri