From 0c370c857b8056a49f7a405c58dcf22c4a371e9b Mon Sep 17 00:00:00 2001 From: Bruce Becker Date: Thu, 4 Jan 2024 08:54:47 +0100 Subject: [PATCH 1/2] chore: update defunct github runner job Signed-off-by: Bruce Becker --- github-runner/.terraform.lock.hcl | 10 ---------- github-runner/github-runner.nomad | 25 ++++++++++++++++--------- loki.nomad | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/github-runner/.terraform.lock.hcl b/github-runner/.terraform.lock.hcl index 3dae226..52a76f9 100644 --- a/github-runner/.terraform.lock.hcl +++ b/github-runner/.terraform.lock.hcl @@ -66,16 +66,6 @@ provider "registry.terraform.io/hashicorp/vault" { constraints = "~> 3.0" hashes = [ "h1:+MSu9iMAo/4bBfVuKnf1Q+FVj7O1MLk5JO3TxFZ+dHU=", - "h1:0EdAX2gaS0I2WNGmFXuV5wECfyd9/LlRm5onWyIdwwM=", - "h1:2tkponlaFG9EaHih3JncL3Cpx8AgPjG1DUby/rQRv18=", - "h1:4xBH9v6FPSZhvQuxiQ+dTU03U0s+/kCN3MQ7jwGmClI=", - "h1:G7oSx70e5BiGsWsJrzb1wWJ4Y07Blqvr6dUreN7P4kU=", - "h1:Q7Ql3dhB0VlHyNNfeAPhlnyFIvWMhqX8AKn/sKhVHaM=", - "h1:S+X+nelOuXR1E2VEfJREFc/rEx+go08rpEzqp8CRk9A=", - "h1:SP6yggdKafep6oE3zFDYNyaFNfnHGnJbChrxPzj1oZ0=", - "h1:a+WylOOygFAE6nVK4SdOlcVosMZH4N5jvkW9h5xZrxM=", - "h1:goH65qO7uzcQBhSDXHsyBe2z7C0JZXmaPLJZHl1mbnk=", - "h1:izlB6ZwVwDs37L8qW7SHZtRLa2Ffu6lIkFif9RYJZcM=", "zh:0f5d14007a4ae668cb2f52ed91985ace0169153643026bd44b9cf3704f271ded", "zh:2e6b6435f3ee58c0a2c633e05b9e0091d31e653433028e455b681b601ac36712", "zh:342bf9ff3f2500576354612fd5b04dd18e9f79d32fc9d913c435db78f72b2c50", diff --git a/github-runner/github-runner.nomad b/github-runner/github-runner.nomad index 03025bd..ef78599 100644 --- a/github-runner/github-runner.nomad +++ b/github-runner/github-runner.nomad @@ -1,19 +1,19 @@ variable "runner_version" { description = "Version to use for the github runner.\nSee https://github.com/actions/runner/releases/" - default = "2.310.2" - type = string + default = "2.310.2" + type = string } variable "github_org" { description = "Name of the github org we attach the runner to" - default = "SouthAfricaDigitalScience" - type = string + default = "AAROC" + type = string } variable "token" { description = "Github Personal Access Token" - default = "AAQEOZFGCRNN2DT7DBTYXMTEGKUB2" - type = string + default = "AAQEOZBRMWMWVTS5EFV534DFLI76E" + type = string } job "github-runner" { datacenters = ["dc1"] @@ -24,7 +24,7 @@ job "github-runner" { source = "https://github.com/actions/runner/releases/download/v${var.runner_version}/actions-runner-linux-${attr.cpu.arch}-${var.runner_version}.tar.gz" } lifecycle { - hook = "prestart" + hook = "prestart" sidecar = false } config { @@ -46,13 +46,20 @@ job "github-runner" { config { command = "/bin/bash" args = [ - "local/run.sh" + "local/exec.sh" ] } + template { + destination = "local/exec.sh" + data = < Date: Thu, 4 Jan 2024 12:03:59 +0100 Subject: [PATCH 2/2] fix(jenkins): add vault stanza to issue a token to the job Signed-off-by: Bruce Becker --- jenkins/jenkins.nomad | 1 + jenkins/jenkins.yml.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins/jenkins.nomad b/jenkins/jenkins.nomad index 0923903..6847186 100644 --- a/jenkins/jenkins.nomad +++ b/jenkins/jenkins.nomad @@ -112,6 +112,7 @@ EOF } // task task "launch" { + vault {} env { CASC_JENKINS_CONFIG = "alloc/data/jenkins.yml" JENKINS_HOME = "alloc/jenkins" diff --git a/jenkins/jenkins.yml.tmpl b/jenkins/jenkins.yml.tmpl index 135d54d..cdbbb1f 100644 --- a/jenkins/jenkins.yml.tmpl +++ b/jenkins/jenkins.yml.tmpl @@ -14,7 +14,7 @@ jenkins: strict: checkSessionMatch: false disableRememberMe: false - markdownFormatter: "plainText" + {{/* markdownFormatter: "plainText" */}} mode: NORMAL myViewsTabBar: "standard" nodeMonitors: