diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-31 13:13:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-02 18:37:22 +0300 |
commit | 283d96de1170f7c42a43bde4e30fdb438939978f (patch) | |
tree | 4a1510bfb15b13eb379dc347eb40716578f0b4a4 /build_files/buildbot/slave_rsync.py | |
parent | a5650961090a6f70d28d5e448ecfe63e352c9ac5 (diff) |
Buildbot: refactor all build slave code
* Move common code into buildbot_utils.py
* Remove legacy code from removed builders
* Split code into smaller functions
Differential Revision: https://developer.blender.org/D5642
Diffstat (limited to 'build_files/buildbot/slave_rsync.py')
-rw-r--r-- | build_files/buildbot/slave_rsync.py | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/build_files/buildbot/slave_rsync.py b/build_files/buildbot/slave_rsync.py index 6936232a495..19f1e67408d 100644 --- a/build_files/buildbot/slave_rsync.py +++ b/build_files/buildbot/slave_rsync.py @@ -21,23 +21,17 @@ # Runs on buildbot slave, rsync zip directly to buildbot server rather # than using upload which is much slower +import buildbot_utils import os import sys -# get builder name -if len(sys.argv) < 2: - sys.stderr.write("Not enough arguments, expecting builder name\n") - sys.exit(1) +if __name__ == "__main__": + builder = buildbot_utils.create_builder_from_arguments() -builder = sys.argv[1] + # rsync, this assumes ssh keys are setup so no password is needed + local_zip = "buildbot_upload.zip" + remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/" + remote_zip = remote_folder + "buildbot_upload_" + builder.name + ".zip" -# rsync, this assumes ssh keys are setup so no password is needed -local_zip = "buildbot_upload.zip" -remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/" -remote_zip = remote_folder + "buildbot_upload_" + builder + ".zip" -command = "rsync -avz %s %s" % (local_zip, remote_zip) - -print(command) - -ret = os.system(command) -sys.exit(ret) + command = ["rsync", "-avz", local_zip, remote_zip] + buildbot_utils.call(command) |