repo_url = ini.get("repo", "url")
-rsync_url = ini.get("rsync", "url")
-rsync_key = ini.get("rsync", "password")
+rsync_bin_url = ini.get("rsync", "binary_url")
+rsync_bin_key = ini.get("rsync", "binary_password")
+
+rsync_src_url = None
+rsync_src_key = None
+
+if ini.has_option("rsync", "source_url"):
+ rsync_src_url = ini.get("rsync", "source_url")
+ rsync_src_key = ini.get("rsync", "source_password")
# find targets
targets = [ ]
factory.addStep(ShellCommand(
name = "uploadprepare",
description = "Preparing target directory",
- command=["rsync", "-av", "--include", "/%s/" %(ts[0]), "--include", "/%s/%s/" %(ts[0], ts[1]), "--exclude", "/*", "--exclude", "/*/*", "--exclude", "/%s/%s/*" %(ts[0], ts[1]), "bin/targets/", "%s/targets/" %(rsync_url)],
- env={'RSYNC_PASSWORD': rsync_key},
+ command=["rsync", "-av", "--include", "/%s/" %(ts[0]), "--include", "/%s/%s/" %(ts[0], ts[1]), "--exclude", "/*", "--exclude", "/*/*", "--exclude", "/%s/%s/*" %(ts[0], ts[1]), "bin/targets/", "%s/targets/" %(rsync_bin_url)],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = True,
logEnviron = False
))
factory.addStep(ShellCommand(
name = "targetupload",
description = "Uploading target files",
- command=["rsync", "--delete", "--delay-updates", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])],
- env={'RSYNC_PASSWORD': rsync_key},
+ command=["rsync", "--delete", "--delay-updates", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_bin_url, ts[0], ts[1])],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = True,
logEnviron = False
))
+ if rsync_src_url is not None:
+ factory.addStep(ShellCommand(
+ name = "sourceupload",
+ description = "Uploading source archives",
+ command=["rsync", "--delay-updates", "-avz", "dl/", "%s/" %(rsync_src_url)],
+ env={'RSYNC_PASSWORD': rsync_src_key},
+ haltOnFailure = True,
+ logEnviron = False
+ ))
+
if False:
factory.addStep(ShellCommand(
name = "packageupload",
description = "Uploading package files",
- command=["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)],
- env={'RSYNC_PASSWORD': rsync_key},
+ command=["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/", "%s/packages/" %(rsync_bin_url)],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = False,
logEnviron = False
))
factory.addStep(ShellCommand(
name = "upload",
description = "Uploading logs",
- command=["rsync", "--delete", "--delay-updates", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])],
- env={'RSYNC_PASSWORD': rsync_key},
+ command=["rsync", "--delete", "--delay-updates", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_bin_url, ts[0], ts[1])],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = False,
alwaysRun = True,
logEnviron = False