-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvar.go
134 lines (114 loc) · 3.13 KB
/
var.go
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// DO NOT EDIT: This file is generated by var_gen.go
package beluga
const (
varApplication = "BELUGA_APPLICATION"
varComposeFile = "COMPOSE_FILE"
varComposeTemplate = "BELUGA_COMPOSE_TEMPLATE"
varContext = "BELUGA_CONTEXT"
varDefaultBranch = "BELUGA_DEFAULT_BRANCH"
varDeployDSN = "BELUGA_DEPLOY_DSN"
varDockerHost = "DOCKER_HOST"
varDockerfile = "BELUGA_DOCKERFILE"
varDomain = "BELUGA_DOMAIN"
varEnvironment = "BELUGA_ENVIRONMENT"
varImage = "BELUGA_IMAGE"
varImages = "BELUGA_IMAGES"
varImagesTemplate = "BELUGA_IMAGES_TEMPLATE"
varOverrides = "BELUGA_OVERRIDES"
varRegistry = "BELUGA_REGISTRY"
varRegistryPassword = "BELUGA_REGISTRY_PASSWORD"
varRegistryUsername = "BELUGA_REGISTRY_USERNAME"
varStackName = "BELUGA_STACK_NAME"
varVersion = "BELUGA_VERSION"
)
var knownVarNames = []string{
varApplication,
varComposeFile,
varComposeTemplate,
varContext,
varDefaultBranch,
varDeployDSN,
varDockerHost,
varDockerfile,
varDomain,
varEnvironment,
varImage,
varImages,
varImagesTemplate,
varOverrides,
varRegistry,
varRegistryPassword,
varRegistryUsername,
varStackName,
varVersion,
}
// If provided, name of the (sub)application to compile
func (e Environment) Application() string {
return e[varApplication]
}
// Compose file(s) for deploying
func (e Environment) ComposeFile() string {
return e[varComposeFile]
}
// A template docker-compose file that may contain mutations for the compose
// file
func (e Environment) ComposeTemplate() string {
return e[varComposeTemplate]
}
// Docker build context
func (e Environment) Context() string {
return e[varContext]
}
// Docker instance for deploying
func (e Environment) DeployDSN() string {
return e[varDeployDSN]
}
// Dockerfile to build
func (e Environment) Dockerfile() string {
return e[varDockerfile]
}
// Domain name of the stack
func (e Environment) Domain() string {
return e[varDomain]
}
// Environment name
func (e Environment) Environment() string {
return e[varEnvironment]
}
// First image listed in BELUGA_IMAGES; doesn't affect pushng
func (e Environment) Image() string {
return e[varImage]
}
// Docker images to push after build
func (e Environment) Images() string {
return e[varImages]
}
// Go template for a space-separated list of Docker images to push after build
func (e Environment) ImagesTemplate() string {
return e[varImagesTemplate]
}
// YAML document with environment names or patterns as keys and variables to
// override as values
func (e Environment) Overrides() string {
return e[varOverrides]
}
// Docker registry for pushing
func (e Environment) Registry() string {
return e[varRegistry]
}
// Password for Docker registry
func (e Environment) RegistryPassword() string {
return e[varRegistryPassword]
}
// Username for Docker registry
func (e Environment) RegistryUsername() string {
return e[varRegistryUsername]
}
// Name of the compose/swamrm/etc. stack
func (e Environment) StackName() string {
return e[varStackName]
}
// Version of the application being built/deployed
func (e Environment) Version() string {
return e[varVersion]
}