Files
jenkins-template/Jenkinsfile
Mpho raf 6b55577a6a
All checks were successful
ci-tests/jenkins-template/pipeline/head This commit looks good
Updated to telegram messges
2022-12-29 12:41:27 +02:00

58 lines
1.4 KiB
Groovy

pipeline {
agent any
stages {
stage('Git-checout') {
steps {
echo "Checkout from git repo"
}
}
stage('Compile') {
steps {
echo "Compilation was a success!!!"
}
}
stage('JUnit') {
steps {
echo "JUnit passed!!"
}
}
stage('Quality-gate') {
steps {
echo "Sonaqube static code analysis passed!!"
sh 'return 0' // change to 1 for testing a failure
}
}
stage('Deploy') {
steps {
echo "Deployment successful!!"
}
}
}
post {
always {
echo "This will always run"
}
success {
echo "This will run only upon success"
telegramSend(message: '[❌] Failed to build 😱', chatId: "${env.TELE_CHAT_ID}")
}
failure {
echo "This will run/show only if failed"
telegramSend(message: '[✅] Build Is a success', chatId: "${env.TELE_CHAT_ID}")
}
unstable {
echo "This will show only if the was marked as unstable!"
}
changed {
echo "This will run only if the state of the pipeline has changed."
echo "For example, if the pipeline was previously failing but it's now successful."
}
}
}