github.com/hernad/nomad@v1.6.112/e2e/taskevents/input/failed_sibling.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "failed_sibling" {
     5    type        = "service"
     6    datacenters = ["dc1"]
     7  
     8    constraint {
     9      attribute = "${attr.kernel.name}"
    10      value     = "linux"
    11    }
    12  
    13    group "failed_sibling" {
    14      restart {
    15        attempts = 0
    16      }
    17  
    18      # Only the task named the same as the job has its events tested.
    19      task "failed_sibling" {
    20        driver = "raw_exec"
    21  
    22        config {
    23          command = "sleep"
    24          args    = ["1000"]
    25        }
    26      }
    27  
    28      task "failure" {
    29        driver = "raw_exec"
    30  
    31        config {
    32          command = "/bin/sh"
    33          args    = ["-c", "sleep 1 && exit 99"]
    34        }
    35      }
    36    }
    37  }