Rename send_deployment_finished_humbug.

(imported from commit 8f1a0b6c70dcbda5bc7288ffd0eeae1ff494b40e)
This commit is contained in:
Tim Abbott
2013-08-06 16:47:45 -04:00
parent b600c9453d
commit f512f53e9e

View File

@@ -36,7 +36,7 @@ def update_deployment(server, refname):
return subprocess.call(["ssh", server, "--", "env", "-u", "GIT_DIR", return subprocess.call(["ssh", server, "--", "env", "-u", "GIT_DIR",
"/home/humbug/humbug-deployments/current/tools/update-deployment", refname]) "/home/humbug/humbug-deployments/current/tools/update-deployment", refname])
def send_deployment_finished_humbug(branch, message): def send_deployment_finished_message(branch, message):
subprocess.check_call(["/home/humbug/humbug/api/bin/humbug-send", "--user=commit-bot@zulip.com", subprocess.check_call(["/home/humbug/humbug/api/bin/humbug-send", "--user=commit-bot@zulip.com",
"--api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "--stream=commits", "--api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "--stream=commits",
"--site=https://staging.zulip.com", "--site=https://staging.zulip.com",
@@ -59,9 +59,9 @@ for ln in sys.stdin:
server, branch = deployments[refname] server, branch = deployments[refname]
ret = update_deployment(server, branch) ret = update_deployment(server, branch)
if ret == 0: if ret == 0:
send_deployment_finished_humbug(branch, "deployment of `%s` finished successfully!" % (newrev[:12],)) send_deployment_finished_message(branch, "deployment of `%s` finished successfully!" % (newrev[:12],))
else: else:
send_deployment_finished_humbug(branch, "deployment of `%s` failed!" % (newrev[:12],)) send_deployment_finished_message(branch, "deployment of `%s` failed!" % (newrev[:12],))
if newrev == '0000000000000000000000000000000000000000': if newrev == '0000000000000000000000000000000000000000':
# 0000000000000000000000000000000000000000 means we're deleting the ref # 0000000000000000000000000000000000000000 means we're deleting the ref