# lifecycle hook test job for batch jobs. touches, removes, and tests # for the existence of files to assert the order of running tasks. # all tasks should exit 0 and the alloc dir should contain the following # files: ./init-ran, ./main-ran, ./poststart-run job "batch-lifecycle" { datacenters = ["dc1"] type = "batch" constraint { attribute = "${attr.kernel.name}" value = "linux" } group "test" { task "init" { lifecycle { hook = "prestart" } driver = "docker" config { image = "busybox:1" command = "/bin/sh" args = ["local/prestart.sh"] } template { data = <