Skip to content

Commit f463093

Browse files
committed
add pipeline event url
1 parent 4267747 commit f463093

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

modules/dop/services/cdp/cdp.go

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424

2525
"github.com/erda-project/erda/apistructs"
2626
"github.com/erda-project/erda/bundle"
27+
"github.com/erda-project/erda/modules/dop/conf"
2728
)
2829

2930
// CDP pipeline 结构体
@@ -165,9 +166,13 @@ func (cdp *CDP) CdpNotifyProcess(pipelineEvent *apistructs.PipelineInstanceEvent
165166
params := map[string]string{
166167
"pipelineID": strconv.FormatUint(pipelineData.PipelineID, 10),
167168
"notifyItemName": notifyItem.DisplayName,
169+
"appID": strconv.FormatUint(pipelineDetail.ApplicationID, 10),
168170
"appName": pipelineDetail.ApplicationName,
171+
"projectID": strconv.FormatUint(pipelineDetail.ProjectID, 10),
169172
"projectName": pipelineDetail.ProjectName,
173+
"orgName": pipelineDetail.OrgName,
170174
"branch": pipelineDetail.Branch,
175+
"uiPublicURL": conf.UIPublicURL(),
171176
}
172177
//失败情况尝输出错误日志
173178
if notifyItem.Name == "pipeline_failed" {

pkg/erda-configs/i18n/notify_item.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ zh-CN:
7878
- 信息:{{message}}
7979
notify.pipeline.pipeline_success: 流水线运行成功
8080
notify.pipeline.pipeline_success.markdown_template: |-
81-
### {{projectName}}/{{appName}} 流水线{{pipelineID}}运行成功
81+
### {{projectName}}/{{appName}} 流水线 {{pipelineID}} 运行成功 {{uiPublicURL}}/{{orgName}}/dop/projects/{{projectID}}/apps/{{appID}}/pipeline?pipelineID={{pipelineID}}
8282
notify.pipeline.pipeline_running: 流水线开始运行
8383
notify.pipeline.pipeline_running.markdown_template: |-
8484
### {{projectName}}/{{appName}} 流水线{{pipelineID}}开始运行
8585
notify.pipeline.pipeline_failed: 流水线运行失败
8686
notify.pipeline.pipeline_failed.markdown_template: |-
87-
### {{projectName}}/{{appName}} 流水线{{pipelineID}}运行失败
87+
### {{projectName}}/{{appName}} 流水线 {{pipelineID}} 运行失败 {{uiPublicURL}}/{{orgName}}/dop/projects/{{projectID}}/apps/{{appID}}/pipeline?pipelineID={{pipelineID}}
8888
{{failedDetail}}
8989
notify.issue.issue_create: 创建任务事件
9090
notify.issue.issue_create.markdown_template: "事件【{{issue_title}}】{{content}}"

0 commit comments

Comments
 (0)