36 lines
558 B
HCL
36 lines
558 B
HCL
job "${name}-${action_name}" {
|
|
region = "global"
|
|
datacenters = ["dc1"]
|
|
|
|
type = "batch"
|
|
|
|
periodic {
|
|
cron = "${action_cron}"
|
|
}
|
|
|
|
group "main" {
|
|
task "${action_name}" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "hashicorp/nomad:$${attr.nomad.version}"
|
|
args = [
|
|
"job",
|
|
"action",
|
|
"-job",
|
|
"${name}",
|
|
"-group",
|
|
"${name}",
|
|
"-task",
|
|
"${name}",
|
|
"${action_name}"
|
|
]
|
|
}
|
|
|
|
identity {
|
|
env = true
|
|
}
|
|
}
|
|
}
|
|
}
|