From d2b8b0c517f1f9c5726d362bd695f10ccc235213 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 14 Mar 2023 17:32:49 +0100 Subject: wip homemade ci? --- cluster/staging/app/ci/deploy/builder.hcl | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 cluster/staging/app/ci/deploy/builder.hcl (limited to 'cluster') diff --git a/cluster/staging/app/ci/deploy/builder.hcl b/cluster/staging/app/ci/deploy/builder.hcl new file mode 100644 index 0000000..b19e23b --- /dev/null +++ b/cluster/staging/app/ci/deploy/builder.hcl @@ -0,0 +1,75 @@ +job "builder" { + namespace = "ci" + type = "batch" + + datacenters = ["neptune", "jupiter", "corrin", "bespin"] + priority = 100 + + parameterized { + payload = "forbidden" + meta_required = [ "REPO_URL", "COMMIT", "BRANCH" ] + } + + reschedule { + attempts = 0 + unlimited = false + } + + task "runner" { + driver = "docker" + config { + image = "nixpkgs/nix:nixos-22.11" + args = [ "/tmp/builder.sh" ] + volumes = [ + "local/builder.sh:/tmp/builder.sh", + "local/nix.conf:/etc/nix/nix.conf" + ] + } + + template { + data = <