osmith has uploaded this change for review.
jenkins-gerrit: tweak notify setting
Instead of notifying everybody listed as reviewers and in CC:
* notify the owner if the build failed
* notify nobody if the build was successful
Related: OS#2385
Change-Id: I7c6c183b98624eb75d5dccd9766ee3ff5568b06e
---
M scripts/jenkins-gerrit/pipeline_summary.py
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/02/29702/1
diff --git a/scripts/jenkins-gerrit/pipeline_summary.py b/scripts/jenkins-gerrit/pipeline_summary.py
index 37d4028..b5310c6 100755
--- a/scripts/jenkins-gerrit/pipeline_summary.py
+++ b/scripts/jenkins-gerrit/pipeline_summary.py
@@ -137,7 +137,8 @@
:returns: a dict that is expected by gerrit's set-review api, e.g.
{"tag": "jenkins",
"message": "...",
- "labels": {"Code-Review": -1}} """
+ "labels": {"Code-Review": -1},
+ "notify": "OWNER"} """
summary = ""
pipeline = parse_pipeline(build_url)
@@ -164,15 +165,19 @@
if jobs["failed"]:
summary += "Build Failed\n"
vote = -1
+ notify = "OWNER"
else:
summary += "Build Successful\n"
vote = 1
+ notify = "NONE"
# Reference:
# https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review
+ # https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input
return {"tag": "jenkins",
"message": summary,
- "labels": {"Verified": vote}}
+ "labels": {"Verified": vote},
+ "notify": notify}
def main():
To view, visit change 29702. To unsubscribe, or for help writing mail filters, visit settings.