2023-04-10 15:36:59 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2019-01-08 22:37:48 +00:00
|
|
|
job "failed_sibling" {
|
2019-10-11 12:00:05 +00:00
|
|
|
type = "service"
|
|
|
|
datacenters = ["dc1"]
|
2019-01-08 22:37:48 +00:00
|
|
|
|
2019-11-25 18:31:00 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
2019-01-08 22:37:48 +00:00
|
|
|
group "failed_sibling" {
|
|
|
|
restart {
|
|
|
|
attempts = 0
|
|
|
|
}
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-01-08 22:37:48 +00:00
|
|
|
# Only the task named the same as the job has its events tested.
|
|
|
|
task "failed_sibling" {
|
|
|
|
driver = "raw_exec"
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-01-08 22:37:48 +00:00
|
|
|
config {
|
|
|
|
command = "sleep"
|
|
|
|
args = ["1000"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "failure" {
|
|
|
|
driver = "raw_exec"
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-01-08 22:37:48 +00:00
|
|
|
config {
|
|
|
|
command = "/bin/sh"
|
|
|
|
args = ["-c", "sleep 1 && exit 99"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|