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" { job "drone" {
datacenters = ["homelab"] datacenters = ["homelab"]
type = "service" type = "service"
constraint { vault {
attribute = "${attr.cpu.arch}" policies = ["access-tables"]
value = "amd64"
} }
group "droneCI" { group "droneCI" {
network { network {
mode = "host" mode = "host"
@ -13,8 +13,9 @@ job "drone" {
to = 80 to = 80
} }
} }
vault { constraint {
policies = ["access-tables"] attribute = "${attr.cpu.arch}"
value = "amd64"
} }
task "drone-server" { task "drone-server" {
driver = "docker" 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
}
}
}
} }