jenkins_pipeline_builder 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jenkins_pipeline_builder/extensions/job_attributes.rb +15 -0
- data/lib/jenkins_pipeline_builder/version.rb +1 -1
- data/spec/lib/jenkins_pipeline_builder/extensions/job_attributes_spec.rb +14 -0
- data/spec/lib/jenkins_pipeline_builder/extensions/registered_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0687f03b5b619d7c56c13d34bfe575bbe94c4311
|
4
|
+
data.tar.gz: 1c55278ff7368bbcb28996ed110d12f73cfd3672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36713dd4e6e414e241cb738d6efd757efae7e8bd0c3c4419831d0820829040920c453b887d8a0942307b1feb62e6d25ec9f97d44981f44cde3cb381922d3b256
|
7
|
+
data.tar.gz: b7118099694c46ca1d4b7e8c85da0604394d3e004c5f92b59ab3d91bef3241c2b556098c7f35dc9a4fc3e302815bdf7a0484a7a756c3e867b39e5d7e4e67a1e0
|
@@ -442,3 +442,18 @@ job_attribute do
|
|
442
442
|
end
|
443
443
|
end
|
444
444
|
end
|
445
|
+
|
446
|
+
job_attribute do
|
447
|
+
name :shared_workspace
|
448
|
+
plugin_id 'shared-workspace'
|
449
|
+
description 'description'
|
450
|
+
jenkins_name 'Shared Workspace'
|
451
|
+
|
452
|
+
xml path: '//properties' do |params|
|
453
|
+
if params[:name]
|
454
|
+
send('org.jenkinsci.plugins.sharedworkspace.SharedWorkspace', 'plugin' => 'shared-workspace@1.0.2') do
|
455
|
+
name params[:name]
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|
@@ -112,6 +112,20 @@ describe 'job_attributes' do
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
+
context 'name parameter' do
|
116
|
+
before :each do
|
117
|
+
params = { shared_workspace: { name: :foo } }
|
118
|
+
JenkinsPipelineBuilder.registry.registry[:job][:shared_workspace].installed_version = '0'
|
119
|
+
JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
|
120
|
+
@parameters = @n_xml.root.children.first
|
121
|
+
expect(@parameters.name).to match 'org.jenkinsci.plugins.sharedworkspace.SharedWorkspace'
|
122
|
+
end
|
123
|
+
|
124
|
+
it 'generates correct config' do
|
125
|
+
expect(@parameters.to_s).to include 'name'
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
115
129
|
context 'disabled' do
|
116
130
|
it 'sets disabled' do
|
117
131
|
params = { disabled: true }
|
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: 1.
|
4
|
+
version: 1.3.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: 2017-
|
12
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|