[buildbot] phase1: remove dead code due to shared_wd=1

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


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

commit 30bd9c2dbd381f4cee922f25d10b6f7ef332f4e9
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Thu Oct 20 15:48:04 2022 +0200

    phase1: remove dead code due to shared_wd=1
    
    shared_wd is always set, the conditional on these bits were thus always
    the same resulting in dead code.
    
    Remove 'expire' config option which is no longer needed.
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/config.ini.example |  1 -
 phase1/master.cfg         | 60 -----------------------------------------------
 2 files changed, 61 deletions(-)

diff --git a/phase1/config.ini.example b/phase1/config.ini.example
index 4cd05d9..a006b56 100644
--- a/phase1/config.ini.example
+++ b/phase1/config.ini.example
@@ -8,7 +8,6 @@ buildbot_url = http://phase1.builds.openwrt.org/
 status_bind = tcp:8010:interface=127.0.0.1
 status_user = example
 status_password = example
-expire = 1209600
 port = 9989
 config_seed = # Seed configuration
 	CONFIG_BUILDBOT=y
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 3bf9338..d2e09e1 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -205,7 +205,6 @@ c['prioritizeBuilders'] = prioritizeBuilders
 work_dir = os.path.abspath(ini['general'].get("workdir", "."))
 scripts_dir = os.path.abspath("../scripts")
 
-tree_expire = inip1.getint("expire", 0)
 config_seed = inip1.get("config_seed", "")
 
 repo_url = ini['repo'].get("url")
@@ -374,21 +373,6 @@ c['schedulers'].append(ForceScheduler(
 def IsSharedWorkdir(step):
 	return bool(step.getProperty("shared_wd"))
 
-def IsCleanupRequested(step):
-	if IsSharedWorkdir(step):
-		return False
-	do_cleanup = step.getProperty("do_cleanup")
-	if do_cleanup:
-		return True
-	else:
-		return False
-
-def IsExpireRequested(step):
-	if IsSharedWorkdir(step):
-		return False
-	else:
-		return not IsCleanupRequested(step)
-
 def IsTaggingRequested(step):
 	val = step.getProperty("tag")
 	if val and re.match(r"^[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", val):
@@ -566,50 +550,6 @@ for target in targets:
 		warnOnFailure = False,
 	))
 
-	# expire tree if needed
-	if tree_expire > 0:
-		factory.addStep(FileDownload(
-			name = "dlexpiresh",
-			doStepIf = IsExpireRequested,
-			mastersrc = scripts_dir + '/expire.sh',
-			workerdest = "../expire.sh",
-			mode = 0o755))
-
-		factory.addStep(ShellCommand(
-			name = "expire",
-			description = "Checking for build tree expiry",
-			command = ["./expire.sh", str(tree_expire)],
-			workdir = ".",
-			haltOnFailure = True,
-			doStepIf = IsExpireRequested,
-			timeout = 2400))
-
-	# cleanup.sh if needed
-	factory.addStep(FileDownload(
-		name = "dlcleanupsh",
-		mastersrc = scripts_dir + '/cleanup.sh',
-		workerdest = "../cleanup.sh",
-		mode = 0o755,
-		doStepIf = IsCleanupRequested))
-
-	factory.addStep(ShellCommand(
-		name = "cleanold",
-		description = "Cleaning previous builds",
-		command = ["./cleanup.sh", c['buildbotURL'], Interpolate("%(prop:workername)s"), Interpolate("%(prop:buildername)s"), "full"],
-		workdir = ".",
-		haltOnFailure = True,
-		doStepIf = IsCleanupRequested,
-		timeout = 2400))
-
-	factory.addStep(ShellCommand(
-		name = "cleanup",
-		description = "Cleaning work area",
-		command = ["./cleanup.sh", c['buildbotURL'], Interpolate("%(prop:workername)s"), Interpolate("%(prop:buildername)s"), "single"],
-		workdir = ".",
-		haltOnFailure = True,
-		doStepIf = IsCleanupRequested,
-		timeout = 2400))
-
 	# Workaround bug when switching from a checked out tag back to a branch
 	# Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html
 	factory.addStep(ShellCommand(




More information about the lede-commits mailing list