pipeline {
    agent any
    stages {
        stage('Example') {
            steps {
                echo 'Hello World'
                sleep time: 30, unit: 'SECONDS'
            }
        }
    }
    post { 
        always { 
            echo 'I will always say Hello again!'
            
            script {
                if(currentBuild.result == 'ABORTED')
                {
                    echo "I echo only if ABORTED"
                }
                if(currentBuild.result == 'FAILED')
                {
                    echo "I echo only if FAILED"
                }                
            }
        }
    }
}
