gradle - How to share jacoco exec files between multilple Jenkins jobs -


i have several java projects runs on several jenkins jobs gradle , jacoco plugins.

let's have 2 jobs:

  • core
  • app

the core job, pulls svn workspace: /jenkins_workspace/core/, builds , creates jacoco exec file. works fine , can see code coverage.

the app job, pulls svn workspace: /jenkins_workspace/app/, builds , creates jacoco exec file. works fine , can see code coverage

however inside app job there tests actullay covered part of core project. code coverage of core job should updated. guess core project should have access jacoco exec file of app job, on 2 different workspaces.

question: how can core job can access jacoco exec file of app job update core code coverage?

you can try use both "destfile" , "append" configuration. if use maven:

<plugin>     <groupid>org.jacoco</groupid>     <artifactid>jacoco-maven-plugin</artifactid>     <executions>         <execution>             <id>jacoco-ut</id>             <phase>process-test-classes</phase>             <goals>                 <goal>prepare-agent</goal>             </goals>             <configuration>                 <destfile>/path/to/jacoco.exec</destfile>                 <append>true</append>             </configuration>         </execution>         </executions> </plugin> 

or gradle:

test {     jacoco {         append = true         destinationfile = file("/path/to/jacoco.exec")     } } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -