forked from malobeo/infrastructure
Compare commits
8 Commits
master
...
e7c84aa4ee
| Author | SHA1 | Date | |
|---|---|---|---|
|
e7c84aa4ee
|
|||
|
69043687cf
|
|||
|
872ab0d944
|
|||
|
79b6b56246
|
|||
|
0a8e7bf271
|
|||
|
caa7dbadb3
|
|||
|
8c797e4269
|
|||
|
e73516fbe7
|
@@ -8,13 +8,13 @@ let
|
||||
enabled = 1;
|
||||
hidden = false;
|
||||
description = "PR ${num}: ${info.title}";
|
||||
checkinterval = 300;
|
||||
checkinterval = 60;
|
||||
schedulingshares = 20;
|
||||
enableemail = false;
|
||||
emailoverride = "";
|
||||
keepnr = 1;
|
||||
type = 1;
|
||||
flake = "${info.head.repo.html_url}/archive/${info.head.ref}.tar.gz";
|
||||
flake = "${info.head.repo.html_url}/archive/${info.head.sha}.tar.gz";
|
||||
inputs = {
|
||||
gitea_repo_name = {
|
||||
type = "string";
|
||||
@@ -33,14 +33,14 @@ let
|
||||
};
|
||||
gitea_status_repo = {
|
||||
type = "string";
|
||||
value = "${info.head.ref}";
|
||||
value = "${info.head.sha}";
|
||||
emailresponsible = false;
|
||||
};
|
||||
};
|
||||
}) prs;
|
||||
mkFlakeJobset = branch: {
|
||||
description = "Build ${branch} branch of the Malobeo Infrastructure repo";
|
||||
checkinterval = 300;
|
||||
checkinterval = 60;
|
||||
enabled = "1";
|
||||
schedulingshares = 100;
|
||||
enableemail = false;
|
||||
@@ -48,7 +48,7 @@ let
|
||||
keepnr = 3;
|
||||
hidden = false;
|
||||
type = 1;
|
||||
flake = "https://git.dynamicdiscord.de/malobeo/infrastructure/archive/${branch}.tar.gz";
|
||||
flake = "https://git.dynamicdiscord.de/ahtlon/infrastructure/archive/${branch}.tar.gz";
|
||||
};
|
||||
|
||||
desc = prJobsets // {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- [musik](./projekte/musik.md)
|
||||
- [TODO](./todo.md)
|
||||
- [Modules]()
|
||||
- [Gitea-translator](./module/gitea-translator.md)
|
||||
- [Initrd-ssh](./module/initssh.md)
|
||||
- [Disks](./module/disks.md)
|
||||
- [How-to]()
|
||||
|
||||
21
doc/src/module/gitea-translator.md
Normal file
21
doc/src/module/gitea-translator.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Gitea-tanslator
|
||||
The module can be used by importing `inputs.self.nixosModules.malobeo.gitea-translator`
|
||||
|
||||
This module starts a python server that fetches the gitea pull request api and translates it to a file that hydra understands.
|
||||
To use, just set the parameters of the gitea server, then send a GET request to either `http://${host}:${port}/` or `http://${host}:${port}/gitea-pulls-sorted.json`
|
||||
|
||||
## Module config
|
||||
##### enable (default = false) - enables the module
|
||||
##### baseurl (default = "git.dynamicdiscord.de") - Base URL of the Gitea instance
|
||||
##### owner (default = "malobeo") - Repository owner
|
||||
##### repo (default = "infrastructure") - Repository name
|
||||
##### host (default = "127.0.0.1") - Address the server binds to
|
||||
##### port (default = 27364) - Port the server listens on
|
||||
|
||||
## Hydra config
|
||||
If you change the default port or host, the file `.hydra/spec.json` has to be modified accordingly.
|
||||
With the module running on the hydra host, create a new hydra project, then:
|
||||
|
||||
- Set `Declarative spec file` to `.hydra/spec.json`
|
||||
- Change declaritive input type to `Git checkout`
|
||||
- Set your git repo location in the field below that
|
||||
@@ -19,7 +19,6 @@ with lib;
|
||||
imports = [
|
||||
self.nixosModules.malobeo.metrics
|
||||
inputs.tasklist.nixosModules.malobeo-tasklist
|
||||
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
@@ -32,6 +31,7 @@ with lib;
|
||||
};
|
||||
|
||||
services.malobeo-tasklist.enable = true;
|
||||
services.gitea-translator.enable = true;
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user