diff --git a/csi-hostpath-operator.nomad b/csi-hostpath-operator.nomad index 67bc9dd..6669521 100644 --- a/csi-hostpath-operator.nomad +++ b/csi-hostpath-operator.nomad @@ -1,11 +1,48 @@ +variable "go_version" { + type = string + description = "Version of Go to use for compiling the plugin" + default = "1.18.8" +} job "csi" { datacenters = ["dc1"] type = "sysbatch" - group "hostpath" { + task "go19" { + resources { + cpu = 100 + memory = 100 + } + driver = "exec" + lifecycle { + hook = "prestart" + } + env { + ARCH = attr.cpu.arch + GO_VERSION = var.go_version + PATH = "${NOMAD_ALLOC_DIR}/usr/local/go/bin:${PATH}" + } + config { + command = "local/script.sh" + } + template { + data = <