pipeline { agent any parameters { booleanParam(defaultValue: true, description: 'blabla?', name: 'userFlag') } stages { stage("foo") { steps { echo "flag: ${params.userFlag}" } post { always { echo 'One way or another, I have finished' junit: 'testresults.xml' } success { echo 'I succeeeded!' } unstable { echo 'I am unstable :/' } failure { echo 'I failed :(' } changed { echo 'Things were different before...' } } } }