jenkins: try to log java files
This commit is contained in:
parent
1439dcdb5e
commit
8619824c41
1 changed files with 6 additions and 3 deletions
|
@ -21,14 +21,17 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Static Code Analysis') {
|
stage('Static Code Analysis') {
|
||||||
when { expression { findFiles(glob: '**/src/main/java/*.java').length > 0 } }
|
when { expression { findFiles(glob: '**/src/main/java/**/*.java').length > 0 } }
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||||
withSonarQubeEnv('sonarqube') {
|
sh "${mvn} compile"
|
||||||
sh "${mvn} compile checkstyle:checkstyle pmd:pmd org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
|
sh "${mvn} checkstyle:checkstyle"
|
||||||
}
|
sh "${mvn} pmd:pmd"
|
||||||
}
|
|
||||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||||
|
withSonarQubeEnv('sonarqube') {
|
||||||
|
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build Java 9') {
|
stage('Build Java 9') {
|
||||||
|
|
Loading…
Reference in a new issue