添加详细信息,和下载链接测试
This commit is contained in:
parent
299d3b5375
commit
b669fcf36a
@ -71,18 +71,37 @@ def call(Map config)
|
||||
{
|
||||
always
|
||||
{
|
||||
dingtalk(
|
||||
robot:'dingtalk_unity_1',
|
||||
type:'MARKDOWN',
|
||||
title:'Build Notice',
|
||||
text: [
|
||||
"### ${currentBuild.currentResult}",
|
||||
"- Project: ${env.JOB_NAME}",
|
||||
"- BuildNumber: #${env.BUILD_NUMBER}",
|
||||
"- Duration: ${currentBuild.durationString}",
|
||||
"- LogUrl: ${env.BUILD_URL}"
|
||||
]
|
||||
)
|
||||
script {
|
||||
// 收集提交记录
|
||||
def changeString = ""
|
||||
def changeLogSets = currentBuild.changeSets
|
||||
if (changeLogSets.size() > 0) {
|
||||
changeString = "\n\nChanges:\n"
|
||||
for (int i = 0; i < changeLogSets.size(); i++) {
|
||||
def entries = changeLogSets[i].items
|
||||
for (int j = 0; j < entries.length; j++) {
|
||||
def entry = entries[j]
|
||||
changeString += "- ${entry.commitId.take(7)} ${entry.msg} - ${entry.author}\n"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
changeString = "\n\nNo changes"
|
||||
}
|
||||
|
||||
dingtalk(
|
||||
robot:'dingtalk_unity_1',
|
||||
type:'MARKDOWN',
|
||||
title:'Build Notice',
|
||||
text: [
|
||||
"### ${currentBuild.currentResult}",
|
||||
"- Project: ${env.JOB_NAME}",
|
||||
"- BuildNumber: #${env.BUILD_NUMBER}",
|
||||
"- Duration: ${currentBuild.durationString}",
|
||||
"- LogUrl: [下载链接](${env.BUILD_URL})",
|
||||
changeString
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user