You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/10/27 19:53:50 UTC

git commit: Use ship-it instead of +/-1.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master ece8f4ec7 -> c2fdea589


Use ship-it instead of +/-1.

Reviewed at https://reviews.apache.org/r/27188/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/c2fdea58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/c2fdea58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/c2fdea58

Branch: refs/heads/master
Commit: c2fdea5895c32fe4629d9a3ce3bbb555306654f9
Parents: ece8f4e
Author: Bill Farner <wf...@apache.org>
Authored: Mon Oct 27 11:51:52 2014 -0700
Committer: Bill Farner <wf...@apache.org>
Committed: Mon Oct 27 11:51:52 2014 -0700

----------------------------------------------------------------------
 build-support/jenkins/review_feedback.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c2fdea58/build-support/jenkins/review_feedback.py
----------------------------------------------------------------------
diff --git a/build-support/jenkins/review_feedback.py b/build-support/jenkins/review_feedback.py
index 9d22358..718c538 100755
--- a/build-support/jenkins/review_feedback.py
+++ b/build-support/jenkins/review_feedback.py
@@ -141,6 +141,7 @@ def main():
         latest_diff['links']['self']['href'],
         accept='text/x-patch')
     sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
+    ship = False
     try:
       _apply_patch(patch_data, args.git_clean_exclude)
       print('Running build command.')
@@ -149,20 +150,25 @@ def main():
       # Pipe to a file in case output is large.
       result = subprocess.call(['bash', '-c', '%s > %s 2>&1' % (command, build_output)])
       if result == 0:
-        review_text = '+1: Master (%s) is green with this patch.\n  %s' % (sha, command)
+        review_text = 'Master (%s) is green with this patch.\n  %s' % (sha, command)
+        ship = True
       else:
         build_tail = subprocess.check_output(['tail', '-n', str(args.tail_lines), build_output])
         review_text = (
-            '-1: Master (%s) is red with this patch.\n  %s\n\n%s' % (sha, command, build_tail))
+            'Master (%s) is red with this patch.\n  %s\n\n%s' % (sha, command, build_tail))
     except PatchApplyError:
       review_text = (
-          '-1: This patch does not apply cleanly on master (%s), do you need to rebase?' % sha)
+          'This patch does not apply cleanly on master (%s), do you need to rebase?' % sha)
 
     print('Replying to review %d:\n%s' % (request['id'], review_text))
     print(server.get_resource(
         request['links']['reviews']['href'],
-        data=urllib.urlencode({'body_top': review_text, 'public': 'true'})))
+        data=urllib.urlencode({
+            'body_top': review_text,
+            'public': 'true',
+            'ship_it': 'true' if ship else 'false'
+        })))
 
 
 if __name__=="__main__":
-  main()
\ No newline at end of file
+  main()