aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jenkins_jobs_linaro/modules/linaro.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/jenkins_jobs_linaro/modules/linaro.py b/jenkins_jobs_linaro/modules/linaro.py
index 860eb3d..0dee847 100644
--- a/jenkins_jobs_linaro/modules/linaro.py
+++ b/jenkins_jobs_linaro/modules/linaro.py
@@ -26,6 +26,13 @@ def linaro_pub_token(parser, xml_parent, data):
"""yaml: linaro-publish-token
Get one-time publishing token for Linaro Publishing API.
Requires the Jenkins Linaro Publishing API plugin.
+
+ :arg str host: Destination server, identified by a Credentials ID as configured
+ in Jenkins Credentials Subsystem.
"""
- XML.SubElement(xml_parent,
+ pubapi = XML.SubElement(xml_parent,
'linaro.pubapi.LinaroPubAPIKey')
+ # Default value to transparently support job config for 1.1 plugin which
+ # didn't support multiple servers.
+ cid = data.get('host', 'snapshots.linaro.org')
+ XML.SubElement(pubapi, 'credentialsId').text = cid