open-nomad/e2e/scheduler_sysbatch/input/sysbatch_periodic.nomad
Mahmood Ali 97966c7a71
e2e: Run system jobs on all datacenters (#11060)
Target all e2e datacenters for system and sysbatch e2e tests.  They
require that the system jobs run on all linux clients.

However, the jobs currenly only target `dc1` datacenter, but the nightly
e2e cluster has 4 clients spread in `dc1` and `dc2` datacenters, causing
the tests to fail.

I missed this problem in e2e dev cluster because it only used a single
dc1 datacenter.
2021-08-17 11:01:47 -04:00

31 lines
476 B
HCL

job "sysbatchjob" {
datacenters = ["dc1", "dc2"]
type = "sysbatch"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
periodic {
cron = "*/15 * * * * *"
prohibit_overlap = true
}
group "sysbatch_job_group" {
count = 1
task "sysbatch_task" {
driver = "docker"
config {
image = "busybox:1"
command = "/bin/sh"
args = ["-c", "echo hi; sleep 1"]
}
}
}
}