diff options
Diffstat (limited to 'utils/new-publish/propagate.py')
-rwxr-xr-x | utils/new-publish/propagate.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/utils/new-publish/propagate.py b/utils/new-publish/propagate.py index 349a7a7..aa12d33 100755 --- a/utils/new-publish/propagate.py +++ b/utils/new-publish/propagate.py @@ -19,6 +19,10 @@ TRIGGER_KEY_FILE = "/home/ubuntu/snapshots-sync2.new/linaro-android-build-publis LOCAL_UPLOAD_DIR = "/mnt/publish/uploads" REMOTE_UPLOAD_DIR = "/uploads/android" +def log(msg): + print msg + sys.stdout.flush() + if __name__ == "__main__": optparser = optparse.OptionParser(usage="%prog <job/build>") @@ -54,22 +58,22 @@ if __name__ == "__main__": dir_list = publib.make_dir_struct(file_list, REMOTE_UPLOAD_DIR, strip=strip) print "Dirs:", dir_list if not options.dry_run: - print "Creating dir structure on upload server" + log("Creating dir structure on upload server") publib.create_dir_struct(dir_list, remote_host, PUBLISH_USER_NAME, options.identity_publish) - print "Done creating dir structure on upload server" + log("Done creating dir structure on upload server") upload_script = publib.make_upload_script(file_list, REMOTE_UPLOAD_DIR, strip=strip) - print "Uploading files to upload server" + log("Uploading files to upload server") publib.upload_files(upload_script, remote_host, PUBLISH_USER_NAME, options.identity_publish, options) - print "Done uploading files to upload server" + log("Done uploading files to upload server") if options.step in ("all", "2"): job, build = args[0].split("/") client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(remote_host, username=TRIGGER_USER_NAME, key_filename=TRIGGER_KEY_FILE) - print "Triggering moving of files from upload to download area" + log("Triggering moving of files from upload to download area") stdin, stdout, stderr = client.exec_command("reshuffle-files -t android -j %s -n %s -m %s" % (job, build, opt_staging)) stdin.close() rc = stdout.channel.recv_exit_status() |