Add support for new option in config_file_provider_builder
Change-Id: Iab4ab936a44868abd4e0dbf3033107c0cf33e312 Task: 4669 story: 2001062
This commit is contained in:
parent
1aa3f9895c
commit
843929143b
|
@ -2060,6 +2060,9 @@ def config_file_provider(registry, xml_parent, data):
|
|||
(default '')
|
||||
* **variable** (`str`) -- Define an environment variable to be
|
||||
used (default '')
|
||||
* **replace-tokens** (`bool`) -- Replace tokens in config file. For
|
||||
example "password: ${PYPI_JENKINS_PASS}" will be replaced with
|
||||
the global variable configured in Jenkins.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ def config_file_provider_builder(xml_parent, data):
|
|||
('file-id', 'fileId', None),
|
||||
('target', 'targetLocation', ''),
|
||||
('variable', 'variable', ''),
|
||||
('replace-tokens', 'replaceTokens', False),
|
||||
]
|
||||
convert_mapping_to_xml(xml_file, file, mapping, fail_required=True)
|
||||
|
||||
|
|
|
@ -200,6 +200,9 @@ def config_file_provider(registry, xml_parent, data):
|
|||
(default '')
|
||||
* **variable** (`str`) -- Define an environment variable to be
|
||||
used (default '')
|
||||
* **replace-tokens** (`bool`) -- Replace tokens in config file.
|
||||
For example "password: ${PYPI_JENKINS_PASS}" will be replaced
|
||||
with the global variable configured in Jenkins.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<fileId>org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012</fileId>
|
||||
<targetLocation>target</targetLocation>
|
||||
<variable>variable</variable>
|
||||
<replaceTokens>true</replaceTokens>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
</managedFiles>
|
||||
</org.jenkinsci.plugins.configfiles.builder.ConfigFileBuildStep>
|
||||
|
|
|
@ -4,3 +4,4 @@ builders:
|
|||
- file-id: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012
|
||||
target: target
|
||||
variable: variable
|
||||
replace-tokens: true
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<fileId>org.jenkinsci.plugins.configfiles.custom.CustomConfig1409250932722</fileId>
|
||||
<targetLocation>tmp/bar.txt</targetLocation>
|
||||
<variable>varname</variable>
|
||||
<replaceTokens>true</replaceTokens>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
</managedFiles>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
|
||||
|
|
|
@ -4,3 +4,4 @@ wrappers:
|
|||
- file-id: org.jenkinsci.plugins.configfiles.custom.CustomConfig1409250932722
|
||||
target: tmp/bar.txt
|
||||
variable: varname
|
||||
replace-tokens: true
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<fileId>org.jenkinsci.plugins.configfiles.custom.CustomConfig1234</fileId>
|
||||
<targetLocation/>
|
||||
<variable/>
|
||||
<replaceTokens>false</replaceTokens>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
</managedFiles>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
<fileId>org.jenkinsci.plugins.configfiles.custom.CustomConfig1234</fileId>
|
||||
<targetLocation/>
|
||||
<variable/>
|
||||
<replaceTokens>false</replaceTokens>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
<org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
<fileId>org.jenkinsci.plugins.configfiles.custom.CustomConfig5678</fileId>
|
||||
<targetLocation>/foo.txt</targetLocation>
|
||||
<variable>varName</variable>
|
||||
<replaceTokens>true</replaceTokens>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile>
|
||||
</managedFiles>
|
||||
</org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper>
|
||||
|
|
|
@ -5,3 +5,4 @@ wrappers:
|
|||
- file-id: org.jenkinsci.plugins.configfiles.custom.CustomConfig5678
|
||||
target: /foo.txt
|
||||
variable: varName
|
||||
replace-tokens: true
|
||||
|
|
Loading…
Reference in New Issue