[buildbot] phase1: make list of builders configurable

LEDE Commits lede-commits at lists.infradead.org
Wed Jun 12 11:35:39 PDT 2024


ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/d7c977e0fd5693a6faa930daf1db09bfb40373c0

commit d7c977e0fd5693a6faa930daf1db09bfb40373c0
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sat Jun 1 11:57:11 2024 +0000

    phase1: make list of builders configurable
    
    Currently we always populate builders (build targets) from the Git tree,
    but for staging environment this is usually overkill as we might need
    just a bunch of targets, so lets make this configurable.
    
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 phase1/config.ini.example | 5 +++++
 phase1/master.cfg         | 9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/phase1/config.ini.example b/phase1/config.ini.example
index 267184f..0e4b551 100644
--- a/phase1/config.ini.example
+++ b/phase1/config.ini.example
@@ -45,6 +45,11 @@ config_seed = # Seed configuration
 	CONFIG_CCACHE=n
 	CONFIG_KERNEL_KALLSYMS=y
 	CONFIG_AUTOREMOVE=y
+build_targets = armsr/armv8
+	malta/be
+	mediatek/filogic
+	qualcommax/ipq807x
+	x86/64
 
 [branch openwrt-22.03]
 name = openwrt-22.03
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 970f7f9..e8764bc 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -93,6 +93,7 @@ def ini_parse_branch(section):
     b["usign_comment"] = section.get("usign_comment", usign_comment)
 
     b["config_seed"] = section.get("config_seed")
+    b["build_targets"] = section.get("build_targets")
 
     b["kmod_archive"] = section.getboolean("kmod_archive", False)
 
@@ -300,8 +301,14 @@ targets = dict()
 
 
 def populateTargets():
+    def buildTargetsConfigured(branch):
+        builders = branches[branch].get("build_targets")
+        return builders and set(filter(None, [t.strip() for t in builders.split("\n")]))
+
     for branch in branchNames:
-        populateTargetsForBranch(branch)
+        targets[branch] = buildTargetsConfigured(branch)
+        if not targets[branch]:
+            populateTargetsForBranch(branch)
 
 
 def populateTargetsForBranch(branch):




More information about the lede-commits mailing list