feat: allow to override STACK_NAME
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-10-05 20:40:05 +02:00
parent 7368cabc49
commit e9113500d8
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 5 additions and 2 deletions

View File

@ -31,7 +31,10 @@ var appDeployCommand = &cli.Command{
for k, v := range abraShEnv {
app.Env[k] = v
}
app.Env["STACK_NAME"] = app.StackName()
if _, exists := app.Env["STACK_NAME"]; !exists {
app.Env["STACK_NAME"] = app.StackName()
}
composeFiles, err := config.GetAppComposeFiles(app.Type, app.Env)
if err != nil {
@ -39,7 +42,7 @@ var appDeployCommand = &cli.Command{
}
deployOpts := stack.Deploy{
Composefiles: composeFiles,
Namespace: app.StackName(),
Namespace: app.Env["STACK_NAME"],
Prune: false,
ResolveImage: stack.ResolveImageAlways,
}