-
Notifications
You must be signed in to change notification settings - Fork 0
/
waypoint.hcl
96 lines (84 loc) · 2.02 KB
/
waypoint.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
project = "prosanteconnect/${workspace.name}/pscextract"
# Labels can be specified for organizational purposes.
labels = { "domaine" = "psc" }
runner {
enabled = true
profile = "secpsc-${workspace.name}"
data_source "git" {
url = "https://github.com/ansforge/psc-extract.git"
ref = "${workspace.name}"
}
poll {
enabled = false
}
}
# An application to deploy.
app "prosanteconnect/pscextract" {
build {
use "docker" {
build_args = {"PROSANTECONNECT_PACKAGE_GITHUB_TOKEN"="${var.github_token}"}
dockerfile = "${path.app}/${var.dockerfile_path}"
disable_entrypoint = true
}
# Uncomment below to use a remote docker registry to push your built images.
registry {
use "docker" {
image = "${var.registry_username}/pscextract"
tag = gitrefpretty()
username = var.registry_username
password = var.registry_password
local = true
}
}
}
# Deploy to Nomad
deploy {
use "nomad-jobspec" {
jobspec = templatefile("${path.app}/pscextract.nomad.tpl", {
datacenter = var.datacenter
nomad_namespace = var.nomad_namespace
registry_username = var.registry_username
})
}
}
}
variable "datacenter" {
type = string
default = ""
env = ["NOMAD_DATACENTER"]
}
variable "nomad_namespace" {
type = string
default = ""
env = ["NOMAD_NAMESPACE"]
}
variable "registry_username" {
type = string
default = ""
env = ["REGISTRY_USERNAME"]
sensitive = true
}
variable "registry_password" {
type = string
default = ""
env = ["REGISTRY_PASSWORD"]
sensitive = true
}
variable "dockerfile_path" {
type = string
default = "Dockerfile"
}
variable "proxy_address" {
type = string
default = ""
}
variable "registry_path" {
type = string
default = "registry.repo.proxy-dev-forge.asip.hst.fluxus.net/prosanteconnect"
}
variable "github_token" {
type = string
default = ""
env = ["PROSANTECONNECT_PACKAGE_GITHUB_TOKEN"]
sensitive = true
}