[buildbot] phase1: perform rsync steps only if configured

LEDE Commits lede-commits at lists.infradead.org
Mon May 15 08:39:30 PDT 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/909e8999f47efeaa1a21eb8afb02def242334276

commit 909e8999f47efeaa1a21eb8afb02def242334276
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Tue Oct 25 19:48:46 2022 +0200

    phase1: perform rsync steps only if configured
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/master.cfg | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 64d350b..424fc9f 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -1027,6 +1027,7 @@ for target in targets:
 		haltOnFailure = True,
 		logEnviron = False,
 		locks = NetLockUl,
+		doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
 	))
 
 	# download remote sha256sums to 'target-sha256sums'
@@ -1040,6 +1041,7 @@ for target in targets:
 		haltOnFailure = False,
 		flunkOnFailure = False,
 		warnOnFailure = False,
+		doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
 	))
 
 	# build list of files to upload
@@ -1076,6 +1078,7 @@ for target in targets:
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
 		haltOnFailure = True,
 		logEnviron = False,
+		doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
 	))
 
 	# delete files which don't exist locally
@@ -1090,6 +1093,7 @@ for target in targets:
 		haltOnFailure = True,
 		logEnviron = False,
 		locks = NetLockUl,
+		doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
 	))
 
 	factory.addStep(ShellCommand(
@@ -1103,7 +1107,7 @@ for target in targets:
 		haltOnFailure = True,
 		logEnviron = False,
 		locks = NetLockUl,
-		doStepIf = IsKmodArchiveEnabled,
+		doStepIf = util.Transform(lambda a, b: bool(a and b), IsKmodArchiveEnabled, GetRsyncParams.withArgs("bin", "url")),
 	))
 
 	factory.addStep(ShellCommand(
@@ -1124,6 +1128,7 @@ for target in targets:
 		haltOnFailure = True,
 		logEnviron = False,
 		locks = NetLockUl,
+		doStepIf = util.Transform(bool, GetRsyncParams.withArgs("src", "url")),
 	))
 
 	factory.addStep(ShellCommand(




More information about the lede-commits mailing list