Add ability to configure releaseEnvVar for maven-deploy publisher

Change-Id: I49ebb38be9eb90c670474fe79a491550e26f3705
This commit is contained in:
Mathieu Gagné 2015-03-11 17:57:21 -04:00
parent d976466c10
commit 51a9b8fb0d
3 changed files with 6 additions and 0 deletions

View File

@ -2102,6 +2102,8 @@ def maven_deploy(parser, xml_parent, data):
(default true)
:arg bool deploy-unstable: Deploy even if the build is unstable
(default false)
:arg str release-env-var: If the given variable name is set to "true",
the deploy steps are skipped. (optional)
Example:
@ -2119,6 +2121,8 @@ def maven_deploy(parser, xml_parent, data):
data.get('unique-version', True)).lower()
XML.SubElement(p, 'evenIfUnstable').text = str(
data.get('deploy-unstable', False)).lower()
if 'release-env-var' in data:
XML.SubElement(p, 'releaseEnvVar').text = data['release-env-var']
def text_finder(parser, xml_parent, data):

View File

@ -6,6 +6,7 @@
<url>http://repo.example.com/maven2/</url>
<uniqueVersion>true</uniqueVersion>
<evenIfUnstable>false</evenIfUnstable>
<releaseEnvVar>TIMER</releaseEnvVar>
</hudson.maven.RedeployPublisher>
</publishers>
</project>

View File

@ -4,3 +4,4 @@ publishers:
url: http://repo.example.com/maven2/
unique-version: true
deploy-unstable: false
release-env-var: TIMER