From 76c59221d171eb56a2ce2bfa630502ff78eeae74 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 24 Mar 2023 11:37:33 +0100 Subject: [PATCH] replace "runner" by "executor" for logs --- hcl/builder.hcl | 8 ++------ main.go | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hcl/builder.hcl b/hcl/builder.hcl index 943bfda..6f1c8e5 100644 --- a/hcl/builder.hcl +++ b/hcl/builder.hcl @@ -2,7 +2,7 @@ job "builder" { namespace = "ci" type = "batch" - datacenters = ["neptune", "jupiter", "corrin", "bespin"] + datacenters = ["bespin", "corrin"] priority = 100 parameterized { @@ -57,6 +57,7 @@ fi task "executor" { driver = "docker" + leader = true config { image = "nixpkgs/nix:nixos-22.11" args = [ "/tmp/builder.sh" ] @@ -162,11 +163,6 @@ experimental-features = nix-command flakes cpu = 1000 memory = 4000 } - - lifecycle { - hook = "prestart" - sidecar = true - } } } } diff --git a/main.go b/main.go index 00cfe48..aed23f7 100644 --- a/main.go +++ b/main.go @@ -302,7 +302,7 @@ func build(w http.ResponseWriter, r *http.Request) { allocFS := NomadClient.AllocFS() scancel := make(chan struct{}) - sframe, serr := allocFS.Logs(myAlloc, true, "runner", logFilter, "start", 0, scancel, &nomad.QueryOptions{}) + sframe, serr := allocFS.Logs(myAlloc, true, "executor", logFilter, "start", 0, scancel, &nomad.QueryOptions{}) // stream logs to client's browser build_loop: