jenkins_pipeline_builder 0.10.6 → 0.10.7
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
|
-
|
4
|
+
OWYzMTYyMGFlYjRiMmQ4ZjFlYzZiOWNiNjkwOTE4NzI4ZWIxN2NmOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODY2NmNmNmM4NzQxNjljNDIxNGNkMGU5MzRlYjMyZmI0ZDVkZWMyMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTg4YWY5NTkxMzc5OTkzMmM0OGMxYzFkMmIzMjRjZjEzNDE3YjM4ZjgxM2Qx
|
10
|
+
YTllYzk0MWYxNjVkMDFkMDk1OGNiNjhhOGNjYTk0MmVkNmVkZWQ0NGFlZjQy
|
11
|
+
NWM4MDQ0NDI2YWU3NDVmNDk3NzVkNmQ5NWZkMDhmNDUwYzhlNjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjUzYzYwMDhkMDE3N2U0OWM1ZjQ0NjIxOGVjN2Q0OWYzZTI3OGRhMmYyMzg4
|
14
|
+
NTVjOGZhYWM1Njk1MTU3NWJkOGM0NjYxMzJkNjZjNzZkMDY3MzUwNzk4OGFk
|
15
|
+
NDU0ODE3NWJmM2M2MmE3NGExNjYxMjg5ZjQwYjFlMWIwNDE1OWE=
|
@@ -90,9 +90,15 @@ wrapper do
|
|
90
90
|
jenkins_name 'Inject passwords to the build as environment variables'
|
91
91
|
announced false
|
92
92
|
|
93
|
-
xml do |
|
93
|
+
xml do |wrapper|
|
94
94
|
EnvInjectPasswordWrapper do
|
95
|
-
|
95
|
+
if wrapper.is_a? Array
|
96
|
+
passwords = wrapper
|
97
|
+
else
|
98
|
+
injectGlobalPasswords wrapper[:inject_global_passwords]
|
99
|
+
passwords = wrapper[:passwords]
|
100
|
+
end
|
101
|
+
break unless passwords
|
96
102
|
passwordEntries do
|
97
103
|
passwords.each do |password|
|
98
104
|
EnvInjectPasswordEntry do
|
@@ -75,6 +75,36 @@ describe 'wrappers' do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
context 'inject_passwords' do
|
79
|
+
before :each do
|
80
|
+
JenkinsPipelineBuilder.registry.registry[:job][:wrappers][:inject_passwords].installed_version = '0.0'
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'generates correct xml with the old way' do
|
84
|
+
wrapper = { wrappers: { inject_passwords: [{ name: 'x', value: 'y' }] } }
|
85
|
+
JenkinsPipelineBuilder.registry.traverse_registry_path('job', wrapper, @n_xml)
|
86
|
+
path = '//buildWrappers/EnvInjectPasswordWrapper/passwordEntries/EnvInjectPasswordEntry[last()]/name'
|
87
|
+
node = @n_xml.root.xpath(path)
|
88
|
+
expect(node.first.content).to eq('x')
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'generates correct xml with the new way' do
|
92
|
+
wrapper = { wrappers: { inject_passwords: { passwords: [{ name: 'x', value: 'y' }] } } }
|
93
|
+
JenkinsPipelineBuilder.registry.traverse_registry_path('job', wrapper, @n_xml)
|
94
|
+
path = '//buildWrappers/EnvInjectPasswordWrapper/passwordEntries/EnvInjectPasswordEntry[last()]/name'
|
95
|
+
node = @n_xml.root.xpath(path)
|
96
|
+
expect(node.first.content).to eq('x')
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'generates correct xml without passwords' do
|
100
|
+
wrapper = { wrappers: { inject_passwords: { inject_global_passwords: true } } }
|
101
|
+
JenkinsPipelineBuilder.registry.traverse_registry_path('job', wrapper, @n_xml)
|
102
|
+
path = '//buildWrappers/EnvInjectPasswordWrapper/injectGlobalPasswords'
|
103
|
+
node = @n_xml.root.xpath(path)
|
104
|
+
expect(node.first.content).to be_truthy
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
78
108
|
context 'nodejs' do
|
79
109
|
before :each do
|
80
110
|
JenkinsPipelineBuilder.registry.registry[:job][:wrappers][:nodejs].installed_version = '0.0'
|
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.10.
|
4
|
+
version: 0.10.7
|
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: 2015-02-
|
12
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|