Actualizar Jenkinsfile.ci
This commit is contained in:
@@ -106,13 +106,29 @@ post {
|
|||||||
def pr = env.CHANGE_ID
|
def pr = env.CHANGE_ID
|
||||||
|
|
||||||
def result = currentBuild.currentResult
|
def result = currentBuild.currentResult
|
||||||
def emoji = (result == 'SUCCESS') ? '✅' : (result == 'UNSTABLE') ? '⚠️' : '❌'
|
def msg = ""
|
||||||
|
|
||||||
def msg = "${emoji} Jenkins: **${result}**\\n\\n" +
|
if (result == "SUCCESS") {
|
||||||
"- Job: `${env.JOB_NAME}`\\n" +
|
msg = """✅ Todo en orden, camarada.
|
||||||
"- Build: #${env.BUILD_NUMBER}\\n" +
|
|
||||||
"- Commit: `${env.GIT_COMMIT?.take(7) ?: env.COMMIT_SHORT}`\\n" +
|
Build #${env.BUILD_NUMBER}
|
||||||
"- URL: ${env.BUILD_URL}"
|
${env.BUILD_URL}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
else if (result == "FAILURE") {
|
||||||
|
msg = """❌ ¿Qué clase de crímenes de guerra has metido en la PR?
|
||||||
|
|
||||||
|
Build #${env.BUILD_NUMBER}
|
||||||
|
${env.BUILD_URL}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg = """⚠️ Dudoso, *arquea una ceja*
|
||||||
|
|
||||||
|
Build #${env.BUILD_NUMBER}
|
||||||
|
${env.BUILD_URL}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
|
||||||
def commentsUrl = "${giteaBase}/gitea/api/v1/repos/${owner}/${repo}/issues/${pr}/comments"
|
def commentsUrl = "${giteaBase}/gitea/api/v1/repos/${owner}/${repo}/issues/${pr}/comments"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user