ci: stand up temporary cron job to run systemd timed stuff until 238971 lands

This commit is contained in:
Aaron Bieber 2023-07-03 07:19:20 -06:00
parent c749979a36
commit 881c62723b
No known key found for this signature in database
3 changed files with 27 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{ config, lib, pkgs, inputs, xinlib, ... }:
let
inherit (xinlib) prIsOpen;
jobs = [
{
name = "xin-ci-update";
@ -79,6 +80,14 @@ in with lib; {
systemd.services = lib.listToAttrs (builtins.map xinlib.jobToService jobs);
services.cron = prIsOpen.option 238971 {
enable = true;
systemCronJobs = [
"0 0 * * * systemctl start xin-ci-update"
"30 * * * * systemctl start xin-ci"
];
};
services = {
tsrevprox = {
enable = true;

View File

@ -7,6 +7,9 @@ let
prStatus = fromJSON (readFile ../pull_requests/${prstr}.json);
in prStatus;
prIsOpen = {
option = pr: a:
let prStatus = getPrStatus pr;
in if prStatus.status == "open" then a else { };
pkg = pr: localPkg: upstreamPkg:
let prStatus = getPrStatus pr;
in if prStatus.status == "open" then

15
pull_requests/238971.json Normal file
View File

@ -0,0 +1,15 @@
{
"branches": [
"staging-23.05",
"staging-next-23.05"
],
"error": "",
"pull_request": 238971,
"release": "stable",
"status": "open",
"status_info": {
"staging-23.05": true,
"staging-next-23.05": true
},
"title": "systemd: fix services not stopping"
}