Velikost videa: 1280 X 720853 X 480640 X 360
Zobrazit ovladače přehrávání
Automatické přehrávání
Přehrát
🤖DISCORD: discord.gg/2F9E2fRGaU⭐PREMIUM Cypress + Typescript course: shorturl.at/dcnPn📣FREE Cypress videos: shorturl.at/h6iEX
Thankyou so muchhhhh!! Really helpfull.
Thanks for the explanation. Completely worked for me.
Great Victor!
please how do I Specify my own token to use with slackSend to override the global one ?
Excelente explicacion, gracias, una pregunta, como configurar la notificacion de slack patra que se envie solo en caso de failure?
Hola Luis, Imagino que podria ser algo como: node { try { notifyBuild('STARTED') stage('Prepare code') { echo 'do checkout stuff' } stage('Testing') { echo 'Testing' echo 'Testing - publish coverage results' } stage('Staging') { echo 'Deploy Stage' } stage('Deploy') { echo 'Deploy - Backend' echo 'Deploy - Frontend' } } catch (e) { // If there was an exception thrown, the build failed currentBuild.result = "FAILED" throw e } finally { // Success or failure, always send notifications notifyBuild(currentBuild.result) }}y el notify build podria ser algo asi: def notifyBuild(String buildStatus = 'STARTED') { // build status of null means successful buildStatus = buildStatus ?: 'SUCCESSFUL' // Default values def colorName = 'RED' def colorCode = '#FF0000' def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" def summary = "${subject} (${env.BUILD_URL})" // Override default values based on build status if (buildStatus == 'STARTED') { color = 'YELLOW' colorCode = '#FFFF00' } else if (buildStatus == 'SUCCESSFUL') { color = 'GREEN' colorCode = '#00FF00' } else { color = 'RED' colorCode = '#FF0000' } // Send notifications slackSend (color: colorCode, message: summary)}
@@joanmedia Gracias lo voy a intentar
@@EnriqueOlavarria Me cuentas
🤖DISCORD: discord.gg/2F9E2fRGaU
⭐PREMIUM Cypress + Typescript course: shorturl.at/dcnPn
📣FREE Cypress videos: shorturl.at/h6iEX
Thankyou so muchhhhh!! Really helpfull.
Thanks for the explanation. Completely worked for me.
Great Victor!
please how do I Specify my own token to use with slackSend to override the global one ?
Excelente explicacion, gracias, una pregunta, como configurar la notificacion de slack patra que se envie solo en caso de failure?
Hola Luis,
Imagino que podria ser algo como: node {
try {
notifyBuild('STARTED')
stage('Prepare code') {
echo 'do checkout stuff'
}
stage('Testing') {
echo 'Testing'
echo 'Testing - publish coverage results'
}
stage('Staging') {
echo 'Deploy Stage'
}
stage('Deploy') {
echo 'Deploy - Backend'
echo 'Deploy - Frontend'
}
} catch (e) {
// If there was an exception thrown, the build failed
currentBuild.result = "FAILED"
throw e
} finally {
// Success or failure, always send notifications
notifyBuild(currentBuild.result)
}
}
y el notify build podria ser algo asi:
def notifyBuild(String buildStatus = 'STARTED') {
// build status of null means successful
buildStatus = buildStatus ?: 'SUCCESSFUL'
// Default values
def colorName = 'RED'
def colorCode = '#FF0000'
def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
def summary = "${subject} (${env.BUILD_URL})"
// Override default values based on build status
if (buildStatus == 'STARTED') {
color = 'YELLOW'
colorCode = '#FFFF00'
} else if (buildStatus == 'SUCCESSFUL') {
color = 'GREEN'
colorCode = '#00FF00'
} else {
color = 'RED'
colorCode = '#FF0000'
}
// Send notifications
slackSend (color: colorCode, message: summary)
}
@@joanmedia Gracias lo voy a intentar
@@EnriqueOlavarria Me cuentas