Browse Source

Revert "report message even if no action is specified"

This reverts commit 031e23f723
and commit 9ba2068664.

This breaks the ability to have silent pipelines.

Instead, how about the following:

  pipelines:
  - name: postmerge
    manager: IndependentPipelineManager
    ...
    success:
      force-message: true

That should work without any additional code.

Change-Id: I0d15b8fcb678a36c46205693ba9a6756ec6a076f
Reviewed-on: https://review.openstack.org/29180
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
changes/87/29287/1
James E. Blair 9 years ago committed by Jenkins
parent
commit
86a88aaa98
  1. 11
      zuul/lib/gerrit.py
  2. 4
      zuul/trigger/gerrit.py

11
zuul/lib/gerrit.py

@ -116,12 +116,11 @@ class Gerrit(object):
cmd = 'gerrit review --project %s' % project
if message:
cmd += ' --message "%s"' % message
if action:
for k, v in action.items():
if v is True:
cmd += ' --%s' % k
else:
cmd += ' --%s %s' % (k, v)
for k, v in action.items():
if v is True:
cmd += ' --%s' % k
else:
cmd += ' --%s %s' % (k, v)
cmd += ' %s' % change
out, err = self._ssh(cmd)
return err

4
zuul/trigger/gerrit.py

@ -131,8 +131,8 @@ class Gerrit(object):
if not change.number:
self.log.debug("Change has no number; not reporting")
return
if not action and not message:
self.log.debug("No action or message specified; not reporting")
if not action:
self.log.debug("No action specified; not reporting")
return
changeid = '%s,%s' % (change.number, change.patchset)
ref = 'refs/heads/' + change.branch

Loading…
Cancel
Save