aboutsummaryrefslogtreecommitdiff
path: root/app/drone-ci/deploy/runner-vm.hcl
diff options
context:
space:
mode:
Diffstat (limited to 'app/drone-ci/deploy/runner-vm.hcl')
-rw-r--r--app/drone-ci/deploy/runner-vm.hcl43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/drone-ci/deploy/runner-vm.hcl b/app/drone-ci/deploy/runner-vm.hcl
new file mode 100644
index 0000000..28beeb8
--- /dev/null
+++ b/app/drone-ci/deploy/runner-vm.hcl
@@ -0,0 +1,43 @@
+job "drone-runner" {
+ datacenters = ["neptune"]
+ type = "system"
+
+ group "runner-vm" {
+ network {
+ port "ssh" { }
+ }
+
+ task "drone-runner-vm" {
+ driver = "qemu"
+
+ config {
+ image_path = "local/drone-runner.qcow2"
+ accelerator = "kvm"
+ args = [
+ "-object", "secret,id=dronesecret0,file=secrets/secret_env"
+ ]
+ port_map {
+ ssh = 22
+ }
+ }
+
+ artifact {
+ source = "https://alex.web.deuxfleurs.fr/drone-runner.qcow2.zst"
+ destination = "local/drone-runner.qcow2"
+ mode = "file"
+ }
+
+ template {
+ data = <<EOH
+DRONE_RPC_SECRET={{ key "secrets/drone-ci/rpc_secret" | trimSpace }}
+DRONE_RUNNER_NAME={{ env "attr.unique.hostname" }}
+EOH
+ destination = "secrets/secret_env"
+ }
+
+ resources {
+ memory = 2000
+ }
+ }
+ }
+}