From 545d426bd3eb459ac1be0d478f1a89ed51e38669 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 27 Nov 2022 15:25:26 +0100 Subject: [PATCH] feat: vault secret in droneCI --- nomad-job/drone-runner.nomad | 48 +++++++++++++++++++++ nomad-job/drone.nomad | 81 ++++++++++++------------------------ vault/approle.tf | 31 ++++++++++++++ 3 files changed, 106 insertions(+), 54 deletions(-) create mode 100644 nomad-job/drone-runner.nomad create mode 100644 vault/approle.tf diff --git a/nomad-job/drone-runner.nomad b/nomad-job/drone-runner.nomad new file mode 100644 index 0000000..ce90f84 --- /dev/null +++ b/nomad-job/drone-runner.nomad @@ -0,0 +1,48 @@ + +job "drone-runner" { + datacenters = ["homelab"] + priority = 50 + type = "system" + meta { + forcedeploy = "0" + } + + group "drone-runner"{ + vault{ + policies= ["droneci"] + + } + + task "drone-runner" { + driver = "docker" + config { + image = "drone/drone-runner-docker:latest" + volumes = [ + "/var/run/docker.sock:/var/run/docker.sock", + ] + } + env { + + } + template { + data = <