master- Sync Repo
This commit is contained in:
parent
35835c6778
commit
7cdeb1a564
8
.groovylintrc.json
Normal file
8
.groovylintrc.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "recommended",
|
||||
"rules": {
|
||||
"LineLength": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -11,19 +11,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
steps {
|
||||
// Get some code from a GitHub repository
|
||||
git 'https://github.com/mabayhan/sonarqubejava'
|
||||
|
||||
// Run Maven on a Unix agent.
|
||||
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
||||
|
||||
// To run Maven on a Windows agent, use
|
||||
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
|
||||
}
|
||||
|
||||
post {
|
||||
// If Maven was able to run the tests, even if some of the test
|
||||
// failed, record the test results and archive the jar file.
|
||||
success {
|
||||
junit '**/target/surefire-reports/TEST-*.xml'
|
||||
archiveArtifacts 'tests/target/*.jar'
|
||||
@ -32,16 +24,34 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Static Code Analysis') {
|
||||
// docker:start
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'sonarsource/sonar-scanner-cli'
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// withSonarQubeEnv('cicd') {
|
||||
// echo '################# MAVEN ###################'
|
||||
// sh 'sonar-scanner -Dsonar.projectKey=sonarqubejava:multimodule -Dsonar.sources=. -Dsonar.java.binaries=.'
|
||||
// }
|
||||
// }
|
||||
// docker:end
|
||||
|
||||
// maven:start
|
||||
agent {
|
||||
docker {
|
||||
image 'sonarsource/sonar-scanner-cli'
|
||||
image "${MAVEN_IMAGE}"
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withSonarQubeEnv('cicd') {
|
||||
sh 'sonar-scanner -Dsonar.projectKey=sonarqubejava:multimodule -Dsonar.sources=. -Dsonar.java.binaries=.'
|
||||
withSonarQubeEnv('SonarQube Server') {
|
||||
echo '################# MAVEN ###################'
|
||||
sh 'mvn sonar:sonar'
|
||||
}
|
||||
}
|
||||
// maven:end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user