Skip to content

Commit

Permalink
Added support of copying artifacts from Unit_Tests job with generated…
Browse files Browse the repository at this point in the history
… JaCoCo report to Code_Analysis job

Changed sonar.sources by default to read only source code without tests
  • Loading branch information
anton-kasperovich committed Apr 22, 2016
1 parent 8cbd6e2 commit 2179e03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions jenkins/jobs/dsl/java_reference_application_jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ unitTestJob.with {
}
}
publishers {
archiveArtifacts("**/*")
downstreamParameterized {
trigger(projectFolderName + "/Reference_Application_Code_Analysis") {
condition("UNSTABLE_OR_BETTER")
Expand Down Expand Up @@ -144,7 +145,7 @@ codeAnalysisJob.with {
}
label("java8")
steps {
copyArtifacts('Reference_Application_Build') {
copyArtifacts('Reference_Application_Unit_Tests') {
buildSelector {
buildNumber('${B}')
}
Expand All @@ -156,7 +157,7 @@ codeAnalysisJob.with {
properties('''sonar.projectKey=${PROJECT_NAME_KEY}
sonar.projectName=${PROJECT_NAME}
sonar.projectVersion=1.0.${B}
sonar.sources=src
sonar.sources=src/main/java
sonar.language=java
sonar.sourceEncoding=UTF-8
sonar.scm.enabled=false''')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class CodeAnalysisReferenceApplicationJobSpec extends Specification {
}

where:
jenkinsJobName = 'Reference_Application_Build'
jenkinsJobName = 'Reference_Application_Unit_Tests'
}

def 'step SonarQube configuration block exists'() {
Expand Down Expand Up @@ -221,7 +221,7 @@ class CodeAnalysisReferenceApplicationJobSpec extends Specification {
text() == 'sonar.projectKey=${PROJECT_NAME_KEY}' + "\n" +
'sonar.projectName=${PROJECT_NAME}' + "\n" +
'sonar.projectVersion=1.0.${B}' + "\n" +
"sonar.sources=src\n" +
"sonar.sources=src/main/java\n" +
"sonar.language=java\n" +
"sonar.sourceEncoding=UTF-8\n" +
"sonar.scm.enabled=false"
Expand Down

0 comments on commit 2179e03

Please sign in to comment.