Skip to content

Commit

Permalink
fix(v2): panic with --add-annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Apr 24, 2024
1 parent 4e0689b commit b8b9e83
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/werf/bundle/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func runApply(ctx context.Context) error {
serviceAnnotations["project.werf.io/env"] = *commonCmdData.Environment
}

var extraAnnotations map[string]string
extraAnnotations := map[string]string{}
for key, value := range bundle.ExtraAnnotationsAndLabelsPostRenderer.ExtraAnnotations {
if strings.HasPrefix(key, "project.werf.io/") ||
strings.Contains(key, "ci.werf.io/") ||
Expand Down
2 changes: 1 addition & 1 deletion cmd/werf/bundle/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func runRender(ctx context.Context) error {
serviceAnnotations["project.werf.io/env"] = *commonCmdData.Environment
}

var extraAnnotations map[string]string
extraAnnotations := map[string]string{}
for key, value := range bundle.ExtraAnnotationsAndLabelsPostRenderer.ExtraAnnotations {
if strings.HasPrefix(key, "project.werf.io/") ||
strings.Contains(key, "ci.werf.io/") ||
Expand Down
2 changes: 1 addition & 1 deletion cmd/werf/converge/converge.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ func run(ctx context.Context, containerBackend container_backend.ContainerBacken
"project.werf.io/env": *commonCmdData.Environment,
}

var userExtraAnnotations map[string]string
userExtraAnnotations := map[string]string{}
if annos, err := common.GetUserExtraAnnotations(&commonCmdData); err != nil {
return err
} else {
Expand Down
2 changes: 1 addition & 1 deletion cmd/werf/plan/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func run(ctx context.Context, containerBackend container_backend.ContainerBacken
"project.werf.io/env": *commonCmdData.Environment,
}

var userExtraAnnotations map[string]string
userExtraAnnotations := map[string]string{}
if annos, err := common.GetUserExtraAnnotations(&commonCmdData); err != nil {
return err
} else {
Expand Down
2 changes: 1 addition & 1 deletion cmd/werf/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func runRender(ctx context.Context, imagesToProcess build.ImagesToProcess) error
"project.werf.io/env": *commonCmdData.Environment,
}

var userExtraAnnotations map[string]string
userExtraAnnotations := map[string]string{}
if annos, err := common.GetUserExtraAnnotations(&commonCmdData); err != nil {
return err
} else {
Expand Down

0 comments on commit b8b9e83

Please sign in to comment.