camply-searches/job.nomad.hcl

47 lines
938 B
HCL
Raw Normal View History

2025-06-27 13:10:53 +00:00
variable "version" {
type = string
}
variable "runner_name" {
description = "The name of the github runner ($GITHUB_RUNNER)"
type = string
}
job "camply_glacier_2025" {
datacenters = ["dc1"]
namespace = "default"
group "task" {
count = 1
task "camply" {
driver = "docker"
artifact {
source = "http://${var.runner_name}:8080/camply-${var.version}.tar"
options {
archive = false
}
}
config {
load = "camply-${var.version}.tar"
image = "camply:${var.version}"
}
template {
data = <<EOF
{{ with nomadVar "nomad/jobs/camply_glacier_2025/task/camply" }}PUSHOVER_PUSH_USER={{ .PUSHOVER_PUSH_USER }}
PUSHOVER_PUSH_TOKEN={{ .PUSHOVER_PUSH_TOKEN}}{{ end }}
EOF
destination = "local/env"
env = true
}
resources {
cpu = 128
memory = 128
}
}
}
}