This is a short tip and (self) reminder about getting GBP to purge old builds from a machine that is disabled on Jenkins.
A bit of background here. Gentoo Build Publisher has a "purge" feature that will auto-purge old builds from a machine. This process kicks off automatically when after new build comes in. But what if that machine has been disabled in Jenkins? There won't be any new builds so there won't be a purge.
The gbpcli (currently) does not have a
purge
subcommand. However there is a bit of an Easter
egg here. If you
pull a build from a machine that already exists on the GBP server it will
notice that and not pull the build again. However it will go through the
purge process for that build. For example:
Here my machine blackwidow has been retired and there are no builds since October 2022. To force a purge of blackwidow I can simply "pull" an existing build:
(🟢 🐮 ~) gbp pull blackwidow 11504
As can be seen, build 9529
got purged. Build 11504
didn't actually get
re-pulled, but the purge happens anyway.
So in summary, you can force an auto-purge for a machine by issuing a gbp
pull
and if there's nothing new to pull you can just issue a gbp pull
on an
existing build. It won't actually re-pull the build, but it will perform the
auto-purge.