diff --git a/pkg/microservice/aslan/core/common/service/instantmessage/workflow_task.go b/pkg/microservice/aslan/core/common/service/instantmessage/workflow_task.go index 6333db2150..ada45f078e 100644 --- a/pkg/microservice/aslan/core/common/service/instantmessage/workflow_task.go +++ b/pkg/microservice/aslan/core/common/service/instantmessage/workflow_task.go @@ -566,7 +566,7 @@ func (w *Service) getNotificationContent(notify *models.NotifyCtl, task *models. } } } - if image != "" { + if image != "" && !strings.HasPrefix(image, "{{.") && !strings.Contains(image, "}}") { jobTplcontent += fmt.Sprintf("{{if eq .WebHookType \"dingding\"}}##### {{end}}**镜像信息**:%s \n", image) mailJobTplcontent += fmt.Sprintf("镜像信息:%s \n", image) workflowNotifyJobTaskSpec.Image = image