Signed-off-by: Jo-Philipp Wich <jo@mein.io>
url = https://git.lede-project.org/source.git
[rsync]
url = https://git.lede-project.org/source.git
[rsync]
-url = user@example.org::upload
-password = example
+binary_url = user@example.org::upload-packages
+binary_password = example
+source_url = user@example.org::upload-sources
+source_password = example2
[slave 1]
name = slave-example-1
[slave 1]
name = slave-example-1
repo_url = ini.get("repo", "url")
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 arches
arches = [ ]
# find arches
arches = [ ]
name = "uploadprepare",
description = "Preparing package directory",
workdir = "build/sdk",
name = "uploadprepare",
description = "Preparing package directory",
workdir = "build/sdk",
- command = ["rsync", "-av", "--include", "/%s/" %(arch[0]), "--exclude", "/*", "--exclude", "/%s/*" %(arch[0]), "bin/packages/", "%s/packages/" %(rsync_url)],
- env={'RSYNC_PASSWORD': rsync_key},
+ command = ["rsync", "-av", "--include", "/%s/" %(arch[0]), "--exclude", "/*", "--exclude", "/%s/*" %(arch[0]), "bin/packages/", "%s/packages/" %(rsync_bin_url)],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = True,
logEnviron = False
))
haltOnFailure = True,
logEnviron = False
))
name = "packageupload",
description = "Uploading package files",
workdir = "build/sdk",
name = "packageupload",
description = "Uploading package files",
workdir = "build/sdk",
- command = ["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])],
- env={'RSYNC_PASSWORD': rsync_key},
+ command = ["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_bin_url, arch[0])],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = True,
logEnviron = False
))
haltOnFailure = True,
logEnviron = False
))
name = "logprepare",
description = "Preparing log directory",
workdir = "build/sdk",
name = "logprepare",
description = "Preparing log directory",
workdir = "build/sdk",
- command = ["rsync", "-av", "--include", "/%s/" %(arch[0]), "--exclude", "/*", "--exclude", "/%s/*" %(arch[0]), "bin/packages/", "%s/faillogs/" %(rsync_url)],
- env={'RSYNC_PASSWORD': rsync_key},
+ command = ["rsync", "-av", "--include", "/%s/" %(arch[0]), "--exclude", "/*", "--exclude", "/%s/*" %(arch[0]), "bin/packages/", "%s/faillogs/" %(rsync_bin_url)],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = True,
logEnviron = False
))
haltOnFailure = True,
logEnviron = False
))
name = "logupload",
description = "Uploading failure logs",
workdir = "build/sdk",
name = "logupload",
description = "Uploading failure logs",
workdir = "build/sdk",
- command = ["rsync", "--delete", "--delay-updates", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])],
- env={'RSYNC_PASSWORD': rsync_key},
+ command = ["rsync", "--delete", "--delay-updates", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_bin_url, arch[0])],
+ env={'RSYNC_PASSWORD': rsync_bin_key},
haltOnFailure = False,
logEnviron = False
))
haltOnFailure = False,
logEnviron = False
))
+ if rsync_src_url is not None:
+ factory.addStep(ShellCommand(
+ name = "sourceupload",
+ description = "Uploading source archives",
+ workdir = "build/sdk",
+ command = ["rsync", "--delay-updates", "-avz", "dl/", "%s/" %(rsync_src_url)],
+ env={'RSYNC_PASSWORD': rsync_src_key},
+ haltOnFailure = False,
+ logEnviron = False
+ ))
+
from buildbot.config import BuilderConfig
c['builders'].append(BuilderConfig(name=arch[0], slavenames=slaveNames, factory=factory))
from buildbot.config import BuilderConfig
c['builders'].append(BuilderConfig(name=arch[0], slavenames=slaveNames, factory=factory))