resolve PR: include the servic info in the log message
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
1c9a931143
commit
81c6caf8ee
|
@ -178,7 +178,7 @@ recipes.
|
|||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
config.ExposeAllEnv(compose, app.Env)
|
||||
config.ExposeAllEnv(stackName, compose, app.Env)
|
||||
|
||||
if !internal.Force {
|
||||
if err := internal.NewVersionOverview(app, deployedVersion, chosenDowngrade, ""); err != nil {
|
||||
|
|
|
@ -189,7 +189,7 @@ recipes.
|
|||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
config.ExposeAllEnv(compose, app.Env)
|
||||
config.ExposeAllEnv(stackName, compose, app.Env)
|
||||
|
||||
if err := internal.NewVersionOverview(app, deployedVersion, chosenUpgrade, releaseNotes); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
|
|
@ -134,7 +134,7 @@ func DeployAction(c *cli.Context) error {
|
|||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
config.ExposeAllEnv(compose, app.Env)
|
||||
config.ExposeAllEnv(app.StackName(), compose, app.Env)
|
||||
|
||||
if err := DeployOverview(app, version, "continue with deployment?"); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
|
|
@ -448,17 +448,17 @@ func GetAppComposeConfig(recipe string, opts stack.Deploy, appEnv AppEnv) (*comp
|
|||
return compose, nil
|
||||
}
|
||||
|
||||
// expose all env variables to the app container
|
||||
func ExposeAllEnv(compose *composetypes.Config, appEnv AppEnv) {
|
||||
// ExposeAllEnv exposes all env variables to the app container
|
||||
func ExposeAllEnv(stackName string, compose *composetypes.Config, appEnv AppEnv) {
|
||||
for _, service := range compose.Services {
|
||||
if service.Name == "app" {
|
||||
logrus.Debug("Add the following environment to the app service config:")
|
||||
logrus.Debugf("Add the following environment to the app service config of %s:", stackName)
|
||||
for k, v := range appEnv {
|
||||
_, exists := service.Environment[k]
|
||||
if !exists {
|
||||
value := v
|
||||
service.Environment[k] = &value
|
||||
logrus.Debugf("Add Key: %s Value: %s", k, value)
|
||||
logrus.Debugf("Add Key: %s Value: %s to %s", k, value, stackName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue