add drone arm runner

This commit is contained in:
vincent 2022-05-10 10:35:33 +02:00
parent 274575bbe5
commit 02eab6c33a

View File

@ -1,11 +1,11 @@
job "drone" {
datacenters = ["homelab"]
type = "service"
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
vault {
policies = ["access-tables"]
}
group "droneCI" {
network {
mode = "host"
@ -13,8 +13,9 @@ job "drone" {
to = 80
}
}
vault {
policies = ["access-tables"]
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
task "drone-server" {
driver = "docker"
@ -85,4 +86,34 @@ job "drone" {
}
}
group "Drone-ARM-Runner" {
constraint {
attribute = "${attr.cpu.arch}"
value = "arm"
}
task "drone-ARM-runner"{
driver = "docker"
config {
image = "drone/drone-runner-docker:latest"
volumes =[
"/var/run/docker.sock:/var/run/docker.sock",
]
}
env {
}
template {
data= <<EOH
{{ with secret "secrets/data/droneCI"}}
DRONE_RPC_HOST="drone.ducamps.win"
DRONE_RPC_PROTO="https"
DRONE_RPC_SECRET= "{{ .Data.data.DRONE_RPC_SECRET}}"
{{ end }}
EOH
destination = "local/drone-runner.env"
env = true
}
}
}
}