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') {
|
||||
when { expression { findFiles(glob: '**/src/main/java/*.java').length > 0 } }
|
||||
when { expression { findFiles(glob: '**/src/main/java/**/*.java').length > 0 } }
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||
withSonarQubeEnv('sonarqube') {
|
||||
sh "${mvn} compile checkstyle:checkstyle pmd:pmd org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
|
||||
}
|
||||
}
|
||||
sh "${mvn} compile"
|
||||
sh "${mvn} checkstyle:checkstyle"
|
||||
sh "${mvn} pmd:pmd"
|
||||
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') {
|
||||
|
|
Loading…
Reference in a new issue