34 lines
899 B
Groovy
34 lines
899 B
Groovy
pipeline {
|
|
agent any
|
|
triggers { pollSCM('H/2 * * * *') }
|
|
parameters {
|
|
string(name: 'GIT_BRANCH', defaultValue: 'wip/jenkinsfile', description: 'Git branch to use')
|
|
}
|
|
stages{
|
|
stage('unit test'){
|
|
steps{
|
|
sh """
|
|
echo "Hey"
|
|
echo "Ho"
|
|
pwd
|
|
ls -la
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
script {
|
|
// Hack to have the 'jenkins build back to normal' mail sent
|
|
if (currentBuild.result == null) {
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
step([$class: 'Mailer',
|
|
notifyEveryUnstableBuild: true,
|
|
recipients: emailextrecipients([[$class: 'CulpritsRecipientProvider'],
|
|
[$class: 'RequesterRecipientProvider']])])
|
|
}
|
|
}
|
|
}
|
|
}
|