resolve PR: include the service info in the log message
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Moritz 2023-01-31 15:30:46 +01:00
parent 23a0b92d88
commit 5b74a56294
1 changed files with 3 additions and 2 deletions

View File

@ -465,11 +465,12 @@ func ExposeAllEnv(stackName string, compose *composetypes.Config, appEnv AppEnv)
}
}
// add a label to signal that a deploy is connected with a recipe
// SetRecipeLabel adds the label 'coop-cloud.${STACK_NAME}.recipe=${RECIPE}' to the app container
// to signal which recipe is connected to the deployed app
func SetRecipeLabel(compose *composetypes.Config, stackName string, recipe string) {
for _, service := range compose.Services {
if service.Name == "app" {
logrus.Debugf("set recipe label to %s", recipe)
logrus.Debugf("set recipe label 'coop-cloud.%s.recipe' to %s for %s", stackName, recipe, stackName)
labelKey := fmt.Sprintf("coop-cloud.%s.recipe", stackName)
service.Deploy.Labels[labelKey] = recipe
}