1:安装DingTalk
2:pipeline
pipeline{
agent any
stages {
stage('Build') {
steps{
echo 'This is a build step'
}
}
stage('Deploy') {
steps{
echo 'This is a deploy step'
}
}
}
post {
success {
dingtalk (
robot: 'c7d682af-74b2-4116-9fc4-b4cb77d4c608',
type:'ACTION_CARD',
atAll: false,
title: 'pipeline_测试_title',
text: [
"![](https://***.oss-cn-beijing.aliyuncs.com/success.png)",
"- 项目:${JOB_NAME} \n",
"- 持续时间:${currentBuild.durationString} \n",
"- 任务:#${BUILD_ID}"
]
)
}
}
}