+ myEnv.buildbot.projects.test = {
+ name = "test";
+ workerPort = config.myEnv.ports.buildbot_test;
+ packages = [ pkgs.git pkgs.gzip pkgs.openssh ];
+ pythonPathHome = false;
+ secrets = {
+ apprise_webhooks = builtins.concatStringsSep "\n" [
+ "{{ .apprise_webhooks.matrix_immae_eu_alert }}"
+ ];
+ notify_xmpp_password = "{{ .xmpp.notify_bot }}";
+ };
+ activationScript = ''
+ install -m 0755 -o buildbot -g buildbot -d /var/lib/ftp/release.immae.eu/test
+ '';
+ webhookTokens = [
+ "{{ .buildbot.webhookTokens.Immae }}"
+ "{{ .buildbot.webhookTokens.Immae }}"
+ ];
+ };
+
+ myServices.chatonsProperties.hostings.buildbot = {
+ file.datetime = "2022-08-21T10:37:00";
+ hosting = {
+ name = "Buildbot";
+ description = "Python-based continuous integration testing framework";
+ type = "INSTANCE";
+ website = "https://git.immae.eu";
+ logo = "https://www.buildbot.net/img/icon.png";
+ status.level = "OK";
+ status.description = "OK";
+ registration.load = "OPEN";
+ install.type = "PACKAGE";
+ guide.user = "https://www.immae.eu/docs/forge-logicielle.html";
+ };
+ software = {
+ name = "Buildbot";
+ website = "https://www.buildbot.net/";
+ license.url = "https://github.com/buildbot/buildbot/blob/master/LICENSE";
+ license.name = "GNU General Public License v2.0";
+ version = pkgs.buildbot.version;
+ source.url = "https://github.com/buildbot/buildbot";
+ };
+ };
+ nixpkgs.overlays = [
+ (self: super: {
+ follow-systemd-unit = self.writeScriptBin "follow-systemd-unit" ''
+ #!${self.stdenv.shell}
+
+ set -euo pipefail
+
+ service=$1
+ before_invocation_id=$2
+
+ get_id() {
+ systemctl show -p InvocationID --value "$service"
+ }
+
+ while [ "$(get_id)" = "$before_invocation_id" ]; do sleep 1; done
+
+ invocation_id="$(get_id)"
+ cursor="$(mktemp)"
+ trap "rm -f $cursor" EXIT
+
+ get_logs() {
+ journalctl --quiet --cursor-file=$cursor INVOCATION_ID=$invocation_id + _SYSTEMD_INVOCATION_ID=$invocation_id
+ }
+
+ while [ -n "$(systemctl show -p Job --value "$service")" ]; do
+ get_logs
+ done
+ get_logs
+ '';
+ })
+ ];