diff options
author | Javier Martinez Canillas <martinez.javier@gmail.com> | 2013-04-01 14:55:56 +0200 |
---|---|---|
committer | Jenkins <jenkins@review.openstack.org> | 2013-04-04 16:24:14 +0000 |
commit | bc235fdfc97a7e91141416065ca09255a4817f13 (patch) | |
tree | f09bf4f07c7406092dfff1afb799c8d89c05ef2c /jenkins_jobs/modules/general.py | |
parent | 2cd1e7fb9d48436b46db048925c5493d2fb3e5f9 (diff) | |
download | python-jenkins-job-builder-bc235fdfc97a7e91141416065ca09255a4817f13.tar.gz python-jenkins-job-builder-bc235fdfc97a7e91141416065ca09255a4817f13.tar.xz python-jenkins-job-builder-bc235fdfc97a7e91141416065ca09255a4817f13.zip |
add an auth-token YAML parameter for the General Job Configuraion module
Using the Jenkins WEB UI an Authentication Token can be specified for
jobs to allow builds to be triggered remotely by using the URL:
JENKINS_URL/job/JOBNAME/build?token=TOKEN
Add an auth-token job parameter to generate the <authToken> XML element.
Change-Id: Ic916e4074c9b2de9c616ef39a88c1d8e1e91fcff
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Reviewed-on: https://review.openstack.org/25819
Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Diffstat (limited to 'jenkins_jobs/modules/general.py')
-rw-r--r-- | jenkins_jobs/modules/general.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/general.py b/jenkins_jobs/modules/general.py index 79163016..3552b4de 100644 --- a/jenkins_jobs/modules/general.py +++ b/jenkins_jobs/modules/general.py @@ -74,6 +74,8 @@ 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'] if data.get('concurrent'): XML.SubElement(xml, 'concurrentBuild').text = 'true' else: |