* [PATCH] htdocs/INDEX.sh: Select only active builders
@ 2024-01-20 3:36 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2024-01-20 3:36 UTC (permalink / raw)
To: buildbot; +Cc: Mark Wielaard
buildbot remembers all builders, but will list inactive builders
with an empty masterids array. So use jq to select only those
builders that have a non-empty masterids field.
---
htdocs/INDEX.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/htdocs/INDEX.sh b/htdocs/INDEX.sh
index 72e94c3..b185ea7 100755
--- a/htdocs/INDEX.sh
+++ b/htdocs/INDEX.sh
@@ -8,8 +8,9 @@ cat index.html.pre
echo '<table>'
lastproject=
-curl -s https://builder.sourceware.org/buildbot/api/v2/builders | jq -r '.builders[].name' |
- sort |
+curl -s https://builder.sourceware.org/buildbot/api/v2/builders \
+ | jq -r '[ .builders[] | { "name": .name, "ids": .masterids | length } ]
+ | map(select(.ids > 0)) | [.[].name] | sort | .[]' |
egrep -v '__Janitor|sourceware' |
while read projbuilder
do
--
2.39.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-20 3:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 3:36 [PATCH] htdocs/INDEX.sh: Select only active builders Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).