Added Jenkinsfile + phpunit
default/news-script/master There was a failure building this commit
Details
default/news-script/master There was a failure building this commit
Details
This commit is contained in:
parent
ed9bb62db2
commit
4cb5267252
|
@ -0,0 +1,25 @@
|
|||
#!groovy
|
||||
|
||||
node {
|
||||
currentBuild.result = "SUCCESS";
|
||||
try {
|
||||
stage('Checkout'){
|
||||
checkout scm
|
||||
}
|
||||
stage('Test'){
|
||||
sh 'phpunit tests/';
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
currentBuild.result = "FAILURE";
|
||||
sh 'rm -rf build dist';
|
||||
|
||||
emailext (
|
||||
subject: "FAILURE: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
|
||||
body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
|
||||
<p>Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"</p>""",
|
||||
recipientProviders: [developers()]
|
||||
)
|
||||
throw err
|
||||
}
|
||||
}
|
Reference in New Issue