-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
46 lines (37 loc) · 1.09 KB
/
Jenkinsfile
File metadata and controls
46 lines (37 loc) · 1.09 KB
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
pipeline {
agent any
stages {
stage('install') {
steps {
sh 'composer install --optimize-autoloader'
}
}
stage('test') {
parallel {
stage('phpunit') {
steps {
sh 'php vendor/bin/phpunit --log-junit var/test/phpunit-log.junit.xml'
}
}
stage('checkstyle') {
steps {
sh 'php vendor/bin/phpcs --report=checkstyle --report-file=var/test/checkstyle.xml || echo "oups exit code $?"'
}
}
stage('php mess detector') {
steps {
sh 'php vendor/bin/phpmd src/ xml codesize,unusedcode,naming,cleancode,controversial,design --reportfile var/test/phpmd.xml || echo "oups exit code $?"'
}
}
}
}
}
post {
always {
junit 'var/test/phpunit-log.junit.xml'
}
failure {
slackSend(channel: "#jenkins-itop-hub", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}