Added Jenkinsfile + phpunit
Some checks failed
default/news-script/master There was a failure building this commit
Some checks failed
default/news-script/master There was a failure building this commit
This commit is contained in:
parent
ed9bb62db2
commit
4cb5267252
25
Jenkinsfile
vendored
Normal file
25
Jenkinsfile
vendored
Normal file
|
@ -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 a new issue