feat: add discord notification and test sign commit (#3)
All checks were successful
TzuWei/pytest-test/pipeline/head This commit looks good

Reviewed-on: #3
Reviewed-by: DaLaw2 <dalaw22222@gmail.com>
Co-authored-by: TzuWei <htw41043223@gmail.com>
Co-committed-by: TzuWei <htw41043223@gmail.com>
This commit is contained in:
TzuWei 2025-11-26 17:26:48 +09:00 committed by tzuwei-huang
parent df1d6fe091
commit 9670bbe948

21
Jenkinsfile vendored
View File

@ -35,4 +35,25 @@ node('ccis') {
stage('Prepare Report') {
junit testResults: 'test-reports/junit-report.xml', allowEmptyResults: true
}
stage('Notify to Discord') {
withCredentials([string(credentialsId: '725eb3cc-b38a-412a-b83c-cd5a5017f8b8', variable: 'DISCORD_WEBHOOK_URL')]) {
script {
def status = currentBuild.currentResult
def desc = """
**Job:** ${env.JOB_NAME}
**Build #:** ${env.BUILD_NUMBER}
**Status:** ${status}
**URL:** ${env.BUILD_URL}
""".stripIndent()
discordSend(
webhookURL: DISCORD_WEBHOOK_URL,
title: "Jenkins Build - ${status}",
description: desc,
result: status
)
}
}
}
}