2018-03-14 17:33:10 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages{
|
|
|
|
stage('unit test'){
|
|
|
|
steps{
|
|
|
|
sh """
|
|
|
|
echo "Hey"
|
2018-03-14 17:41:24 +01:00
|
|
|
echo "Ho"
|
2018-03-14 18:12:25 +01:00
|
|
|
echo "Hi"
|
2018-03-14 18:36:08 +01:00
|
|
|
echo "${env.BRANCH_NAME}"
|
2018-03-14 18:55:43 +01:00
|
|
|
echo "aaaa"
|
2018-03-14 17:33:10 +01:00
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
// Hack to have the 'jenkins build back to normal' mail sent
|
|
|
|
if (currentBuild.result == null) {
|
|
|
|
currentBuild.result = 'SUCCESS'
|
|
|
|
}
|
2018-03-14 18:36:08 +01:00
|
|
|
if (env.BRANCH_NAME == 'master') {
|
|
|
|
step([$class: 'Mailer', notifyEveryUnstableBuild: true,
|
|
|
|
recipients: "manukaz@gmail.com", sendToIndividuals: true])
|
|
|
|
} else {
|
|
|
|
step([$class: 'Mailer',
|
|
|
|
notifyEveryUnstableBuild: true,
|
|
|
|
recipients: emailextrecipients([[$class: 'CulpritsRecipientProvider'],
|
|
|
|
[$class: 'RequesterRecipientProvider']])])
|
|
|
|
}
|
2018-03-14 17:33:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|