59 lines
948 B
Text
59 lines
948 B
Text
|
job "jenkins" {
|
||
|
datacenters = ["columbia"]
|
||
|
region = "global"
|
||
|
type = "service"
|
||
|
|
||
|
update {
|
||
|
stagger = "30s"
|
||
|
max_parallel = 1
|
||
|
}
|
||
|
|
||
|
constraint {
|
||
|
attribute = "${meta.long_lived}"
|
||
|
value = "true"
|
||
|
}
|
||
|
|
||
|
group "jenkins" {
|
||
|
count = 1
|
||
|
|
||
|
task "jenkins" {
|
||
|
driver = "docker"
|
||
|
config {
|
||
|
image = "docker.service.masked.name:8082/jenkins"
|
||
|
ports = ["https"]
|
||
|
volumes = [
|
||
|
"/opt/jenkins_home:/var/jenkins_home"
|
||
|
]
|
||
|
}
|
||
|
|
||
|
env {
|
||
|
ROOT_URL = "${NOMAD_ADDR_https}"
|
||
|
}
|
||
|
|
||
|
resources {
|
||
|
cpu = 2000
|
||
|
memory = 2048
|
||
|
}
|
||
|
}
|
||
|
|
||
|
network {
|
||
|
port "https" {
|
||
|
to = 8080
|
||
|
}
|
||
|
}
|
||
|
|
||
|
service {
|
||
|
name = "jenkins"
|
||
|
port = "https"
|
||
|
|
||
|
check {
|
||
|
name = "jenkins"
|
||
|
type = "tcp"
|
||
|
interval = "10s"
|
||
|
timeout = "2s"
|
||
|
address_mode = "driver"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|