2020-10-09 21:31:38 +00:00
|
|
|
job "sysbatchjob" {
|
2021-08-17 15:01:47 +00:00
|
|
|
datacenters = ["dc1", "dc2"]
|
2020-10-09 21:31:38 +00:00
|
|
|
|
|
|
|
type = "sysbatch"
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
parameterized {
|
|
|
|
payload = "forbidden"
|
|
|
|
meta_required = ["KEY"]
|
|
|
|
}
|
|
|
|
|
|
|
|
group "sysbatch_job_group" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
task "sysbatch_task" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2021-08-03 15:35:00 +00:00
|
|
|
image = "busybox:1"
|
2020-10-09 21:31:38 +00:00
|
|
|
|
2021-08-03 15:35:00 +00:00
|
|
|
command = "/bin/sh"
|
|
|
|
args = ["-c", "echo hi; sleep 1"]
|
2020-10-09 21:31:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|