jenkins_pipeline_builder 0.8.1 → 0.8.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02c5a6f146ee6cbc2d05531f77ab5e29115586af
|
4
|
+
data.tar.gz: c299f2a21aee7479f12397e19b395314d0a651cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 741140017fddf92b7cb19d4b5aaf8bf8f12d8e851f3665f6bb27571355a452f74c76408bcc7ee0b3037bcd69dcaf9d09bcf43f5c87e4c9fd5167567100ae63c9
|
7
|
+
data.tar.gz: 2f4f027d1cf4ae672c022fba30499a8c45368156ca1e63721280e8c26489eed2f605b06629e1a75bb7062d678b5d084def9897a1c97e5619c302c12a19b22ea6
|
@@ -129,11 +129,9 @@ job_attribute do
|
|
129
129
|
]
|
130
130
|
|
131
131
|
before do |params|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
xpath('//scm/userRemoteConfigs').remove
|
136
|
-
end
|
132
|
+
remote_url = xpath('//scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig/url').first
|
133
|
+
params[:remote_url] = remote_url.content if remote_url
|
134
|
+
xpath('//scm/userRemoteConfigs').remove
|
137
135
|
end
|
138
136
|
|
139
137
|
xml path: '//scm' do |params|
|
@@ -68,6 +68,27 @@ describe 'job_attributes' do
|
|
68
68
|
expect(scm_config.css('configVersion').first.content).to eq '2'
|
69
69
|
end
|
70
70
|
|
71
|
+
it 'sets the remote url name all the time' do
|
72
|
+
params = { scm_params: {}, scm_url: 'http://foo.com' }
|
73
|
+
|
74
|
+
JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
|
75
|
+
|
76
|
+
scm_config = @n_xml.xpath('//scm').first
|
77
|
+
|
78
|
+
expect(
|
79
|
+
scm_config.xpath('//scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig').first.children.map(&:name)
|
80
|
+
).to_not include 'refspec'
|
81
|
+
expect(
|
82
|
+
scm_config.xpath('//scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig').first.children.map(&:name)
|
83
|
+
).to_not include 'name'
|
84
|
+
expect(
|
85
|
+
scm_config.xpath('//scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig/url').first
|
86
|
+
).to be_truthy
|
87
|
+
expect(
|
88
|
+
scm_config.xpath('//scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig/url').first.content
|
89
|
+
).to eq 'http://foo.com'
|
90
|
+
end
|
91
|
+
|
71
92
|
it 'writes a single block if refspec and remote_name are specified' do
|
72
93
|
params = { scm_params: { refspec: :bar, remote_name: :foo }, scm_url: 'http://foo.com' }
|
73
94
|
|
@@ -109,7 +130,7 @@ describe 'job_attributes' do
|
|
109
130
|
expect(scm_config.css('recursiveSubmodules').first).to be_truthy
|
110
131
|
expect(scm_config.css('trackingSubmodules').first).to be_truthy
|
111
132
|
expect(scm_config.css('localBranch').first).to be_truthy
|
112
|
-
expect(scm_config.css('
|
133
|
+
expect(scm_config.css('excludedUsers').first).to be_truthy
|
113
134
|
expect(scm_config.css('includedRegions').first).to be_truthy
|
114
135
|
expect(scm_config.css('excludedRegions').first).to be_truthy
|
115
136
|
expect(scm_config.css('credentialsId').first).to be_truthy
|
@@ -121,7 +142,7 @@ describe 'job_attributes' do
|
|
121
142
|
expect(scm_config.css('recursiveSubmodules').first.content).to eq 'true'
|
122
143
|
expect(scm_config.css('trackingSubmodules').first.content).to eq 'false'
|
123
144
|
expect(scm_config.css('localBranch').first.content).to eq 'local'
|
124
|
-
expect(scm_config.css('
|
145
|
+
expect(scm_config.css('excludedUsers').first.content).to eq 'exclude_me'
|
125
146
|
expect(scm_config.css('includedRegions').first.content).to eq 'included_region'
|
126
147
|
expect(scm_config.css('excludedRegions').first.content).to eq 'excluded_region'
|
127
148
|
expect(scm_config.css('credentialsId').first.content).to eq 'creds'
|
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.
|
4
|
+
version: 0.8.2
|
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-
|
12
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|