Merge "bug/2002053 allow None for auth-token"

This commit is contained in:
Zuul 2018-05-20 13:33:47 +00:00 committed by Gerrit Code Review
commit 5aa4f1a9d9
7 changed files with 38 additions and 2 deletions

View File

@ -155,8 +155,9 @@ class General(jenkins_jobs.modules.base.Base):
else:
XML.SubElement(xml,
'blockBuildWhenUpstreamBuilding').text = 'false'
if 'auth-token' in data:
XML.SubElement(xml, 'authToken').text = data['auth-token']
authtoken = data.get('auth-token', None)
if authtoken is not None:
XML.SubElement(xml, 'authToken').text = authtoken
if data.get('concurrent'):
XML.SubElement(xml, 'concurrentBuild').text = 'true'
else:

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<keepDependencies>false</keepDependencies>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<concurrentBuild>false</concurrentBuild>
<canRoam>true</canRoam>
</project>

View File

@ -0,0 +1,2 @@
project-type: freestyle
auth-token:

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<keepDependencies>false</keepDependencies>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<authToken>testvalue</authToken>
<concurrentBuild>false</concurrentBuild>
<canRoam>true</canRoam>
</project>

View File

@ -0,0 +1,2 @@
project-type: freestyle
auth-token: 'testvalue'

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<keepDependencies>false</keepDependencies>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<authToken/>
<concurrentBuild>false</concurrentBuild>
<canRoam>true</canRoam>
</project>

View File

@ -0,0 +1,2 @@
project-type: freestyle
auth-token: ''