-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkinsfile
47 lines (37 loc) · 1.27 KB
/
jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* This pipeline requires the following plugins:
Git: https://plugins.jenkins.io/git/
Workflow Aggregator: https://plugins.jenkins.io/workflow-aggregator/
JUnit: https://plugins.jenkins.io/junit/
Allure: https://plugins.jenkins.io/allure-jenkins-plugin/
Docker Pipeline: https://plugins.jenkins.io/docker-workflow/
*/
pipeline {
agent any
stages {
stage('build') {
steps {
// Make sure dependencies are installed
sh 'composer install'
// run the PHP linter
sh 'find . -wholename "./src/*.php" -print0 | xargs -0 -n1 php -l'
}
}
stage('test') {
steps {
// run the PHP unit tests and return test coverage statistics
sh './vendor/bin/phpunit --coverage-html src/tests/coverage --log-junit testresult.xml'
}
}
}
post {
always {
// publish the junit test result
junit 'testresult.xml'
// create the allure test resport
allure includeProperties:
false,
jdk: '',
results: [[path: 'allure-results']]
}
}
}