summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2015-03-24 15:38:34 +0100
committerKhai Do <zaro0508@gmail.com>2015-04-17 12:47:03 -0700
commitb7d61cde6083535087ca968c36ec6c48dd0ec1e0 (patch)
tree0bd7c845acf92c9b27797c272ec0c22c99142323
parentf14589b14d31903f2d78cb698425500de925948e (diff)
downloadpython-jenkins-job-builder-b7d61cde6083535087ca968c36ec6c48dd0ec1e0.tar.gz
python-jenkins-job-builder-b7d61cde6083535087ca968c36ec6c48dd0ec1e0.tar.xz
python-jenkins-job-builder-b7d61cde6083535087ca968c36ec6c48dd0ec1e0.zip
zuul: drop notifications
Before Zuul migrated to Gearman, the jobs had to notify Zuul on start and completion. That was done using the Jenkins notification plugin and the configuration is done in JJB by using `triggers: [ zuul ]` which also adds the build parameters to the job. Since Zuul migrated to Gearman, the jenkins_endpoint listener ( http://127.0.0.1:8001/jenkins_endpoint ) has been removed so those HTTPs requests are noops. Migration to Gearman happend in Zuul ver 2.0 Remove notifications entirely. Keep the build parameters to retain the ability to manually trigger a build. Adjust documentation accordingly. Change-Id: Ifba876d001da90301b1efbfea3c2b8b031b42303
-rw-r--r--jenkins_jobs/modules/zuul.py33
1 files changed, 2 insertions, 31 deletions
diff --git a/jenkins_jobs/modules/zuul.py b/jenkins_jobs/modules/zuul.py
index 79b428f6..a2b2cbcc 100644
--- a/jenkins_jobs/modules/zuul.py
+++ b/jenkins_jobs/modules/zuul.py
@@ -13,24 +13,9 @@
# under the License.
"""
-The Zuul module adds triggers that configure jobs for use with Zuul_. It
-essentially adds the jobs parameters `expected by Zuul`_.
+The Zuul module adds jobs parameters to manually run a build as Zuul would
+have. It is entirely optional, Zuul 2.0+ pass the parameters over Gearman.
-With Zuul version 2.0 and later, this is optional. The jobs are
-triggered via the Jenkins Gearman plugin which passes the parameters
-internally. You might still want to explicitly define parameters to
-retain the possibility of triggering jobs manually via the Jenkins web
-interface (build with parameters).
-
-To change the Zuul notification URL, set a global default::
-
- - defaults:
- name: global
- zuul-url: http://127.0.0.1:8001/jenkins_endpoint
-
-The above URL is the default.
-
-.. _Zuul: http://ci.openstack.org/zuul/
.. _expected by Zuul: \
http://ci.openstack.org/zuul/launchers.html#zuul-parameters
"""
@@ -146,8 +131,6 @@ ZUUL_POST_PARAMETERS = [
'name': 'ZUUL_SHORT_NEWREV'}},
]
-DEFAULT_URL = 'http://127.0.0.1:8001/jenkins_endpoint'
-
class Zuul(jenkins_jobs.modules.base.Base):
sequence = 0
@@ -166,18 +149,6 @@ class Zuul(jenkins_jobs.modules.base.Base):
continue
if 'parameters' not in job:
job['parameters'] = []
- if 'notifications' not in job:
- job['notifications'] = []
- # This isn't a good pattern, and somewhat violates the
- # spirit of the global defaults, but Zuul is working on
- # a better design that should obviate the need for most
- # of this module, so this gets it done with minimal
- # intrusion to the rest of JJB.
- if parser.data.get('defaults', {}).get('global'):
- url = parser.data['defaults']['global'].get(
- 'zuul-url', DEFAULT_URL)
- notifications = [{'http': {'url': url}}]
- job['notifications'].extend(notifications)
if 'zuul' in job.get('triggers', []):
job['parameters'].extend(ZUUL_PARAMETERS)
job['triggers'].remove('zuul')