github.com/hernad/nomad@v1.6.112/e2e/consultemplate/input/template_paths.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "template-paths" { 5 datacenters = ["dc1", "dc2"] 6 7 meta { 8 ARTIFACT_DEST_DIR = "local/foo/src" 9 } 10 11 constraint { 12 attribute = "${attr.kernel.name}" 13 value = "linux" 14 } 15 16 group "template-paths" { 17 18 task "task" { 19 20 driver = "docker" 21 22 config { 23 image = "busybox:1" 24 command = "/bin/sh" 25 args = ["-c", "sleep 300"] 26 } 27 28 artifact { 29 source = "https://google.com" 30 destination = "${NOMAD_META_ARTIFACT_DEST_DIR}" 31 } 32 33 template { 34 source = "${NOMAD_TASK_DIR}/foo/src" 35 destination = "${NOMAD_SECRETS_DIR}/foo/dst" 36 } 37 38 template { 39 destination = "${NOMAD_ALLOC_DIR}/shared.txt" 40 data = <<EOH 41 Data shared between all task in alloc dir. 42 EOH 43 } 44 45 resources { 46 cpu = 128 47 memory = 64 48 } 49 } 50 } 51 }