github.com/hernad/nomad@v1.6.112/e2e/clientstate/sleeper.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  # Sleeper is a fake service that outputs its pid to a file named `pid` to
     5  # assert duplicate tasks are never started.
     6  
     7  job "sleeper" {
     8    datacenters = ["dc1"]
     9  
    10    constraint {
    11      attribute = "${attr.kernel.name}"
    12      value     = "linux"
    13    }
    14  
    15    task "sleeper" {
    16      driver = "raw_exec"
    17  
    18      config {
    19        command = "/bin/bash"
    20        args    = ["-c", "echo $$ >> pid && sleep 999999"]
    21      }
    22    }
    23  }