pipeline { agent any stages { stage('Deploy') { when { currentBuild.result == 'SUCCESS' } steps { sh '/usr/bin/make publish' } } } }