Bug 1147271 - Add ssh option to prevent hanging on password prompt in upload.py. r=mshal, a=release
authorChris Manchester <cmanchester@mozilla.com>
Thu, 11 May 2017 09:40:58 -0700
changeset 396263 a64a82ad06cee055737560703f9dbc0124915a2b
parent 396262 1511c3039be28f44f404aaa80d81a7dce9da3bb5
child 396264 c21ce937c63d547e9e18f726db98c773299e9662
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal, release
bugs1147271
milestone54.0
Bug 1147271 - Add ssh option to prevent hanging on password prompt in upload.py. r=mshal, a=release MozReview-Commit-ID: Lmg5SAtLuE3
build/upload.py
--- a/build/upload.py
+++ b/build/upload.py
@@ -85,16 +85,18 @@ def AppendOptionalArgsToSSHCommandline(c
     commandline arguments to the list cmdline if the values are not None."""
     if port is not None:
         cmdline.append("-P%d" % port)
     if ssh_key is not None:
         # Don't interpret ~ paths - ssh can handle that on its own
         if not ssh_key.startswith('~'):
             ssh_key = WindowsPathToMsysPath(ssh_key)
         cmdline.extend(["-o", "IdentityFile=%s" % ssh_key])
+    # In case of an issue here we don't want to hang on a password prompt.
+    cmdline.extend(["-o", "BatchMode=yes"])
 
 def DoSSHCommand(command, user, host, port=None, ssh_key=None):
     """Execute command on user@host using ssh. Optionally use
     port and ssh_key, if provided."""
     cmdline = ["ssh"]
     AppendOptionalArgsToSSHCommandline(cmdline, port, ssh_key)
     cmdline.extend(["%s@%s" % (user, host), command])