Files
jenkins-template/Jenkinsfile
Mpho raf 6cc2171518
Some checks failed
test-jenkins/jenkins-template/pipeline/head There was a failure building this commit
template return 1
2020-11-15 19:17:27 +02:00

55 lines
1.2 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 1' // 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"
}
failure {
echo "This will run/show only if failed"
}
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."
}
}
}