Changeset View
Changeset View
Standalone View
Standalone View
build_files/buildbot/slave_rsync.py
| Show All 15 Lines | |||||
| # | # | ||||
| # ##### END GPL LICENSE BLOCK ##### | # ##### END GPL LICENSE BLOCK ##### | ||||
| # <pep8 compliant> | # <pep8 compliant> | ||||
| # Runs on buildbot slave, rsync zip directly to buildbot server rather | # Runs on buildbot slave, rsync zip directly to buildbot server rather | ||||
| # than using upload which is much slower | # than using upload which is much slower | ||||
| import buildbot_utils | |||||
| import os | import os | ||||
| import sys | import sys | ||||
| # get builder name | if __name__ == "__main__": | ||||
| if len(sys.argv) < 2: | builder = buildbot_utils.create_builder_from_arguments() | ||||
| sys.stderr.write("Not enough arguments, expecting builder name\n") | |||||
| sys.exit(1) | |||||
| builder = sys.argv[1] | |||||
| # rsync, this assumes ssh keys are setup so no password is needed | # rsync, this assumes ssh keys are setup so no password is needed | ||||
| local_zip = "buildbot_upload.zip" | local_zip = "buildbot_upload.zip" | ||||
| remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/" | remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/" | ||||
| remote_zip = remote_folder + "buildbot_upload_" + builder + ".zip" | remote_zip = remote_folder + "buildbot_upload_" + builder.name + ".zip" | ||||
| command = "rsync -avz %s %s" % (local_zip, remote_zip) | |||||
| print(command) | |||||
| ret = os.system(command) | command = ["rsync", "-avz", local_zip, remote_zip] | ||||
| sys.exit(ret) | buildbot_utils.call(command) | ||||