add hydra declarative projects

This commit is contained in:
Jörg Thalheim 2022-05-12 00:07:07 +02:00
parent 6f0331a79e
commit 0c8eb5ed6a
No known key found for this signature in database
4 changed files with 38 additions and 0 deletions

BIN
secrets/hydra-password Normal file

Binary file not shown.

View file

@ -16,6 +16,7 @@ mkShell {
p.cloudflare
p.null
p.external
p.hydra
]
))
sops
@ -31,5 +32,6 @@ mkShell {
shellHook = ''
export CLOUDFLARE_API_TOKEN=$(< ./secrets/cloudflare-api-token)
export HYDRA_PASSWORD=$(< ./secrets/hydra-password)
'';
}

View file

@ -0,0 +1,28 @@
resource "hydra_project" "kittybox" {
name = "kittybox"
display_name = "Kittybox"
description = "The IndieWeb blogging solution"
homepage = "https://gitlab.com/kittybox/kittybox"
owner = "admin"
enabled = true
visible = true
}
resource "hydra_jobset" "kittybox" {
project = hydra_project.kittybox.name
state = "enabled"
visible = true
name = "main"
type = "flake"
description = "main branch"
flake_uri = "gitlab:kittybox/kittybox"
check_interval = 300
scheduling_shares = 3000
keep_evaluations = 3
email_notifications = false
#email_override = ""
}

View file

@ -8,9 +8,17 @@ terraform {
cloudflare = {
source = "cloudflare/cloudflare"
}
hydra = {
source = "DeterminateSystems/hydra"
}
}
}
provider "cloudflare" {
account_id = "e4a2db52c495db230973c839a0699ae1"
}
provider "hydra" {
host = "https://hydra.nix-community.org"
username = "admin"
}