Finally found a solution on my own.
In SBT, you can define a new task A that captures the result of another task B. This dependency ensures that task B starts when a new task A starts. Having captured the result, the result of task B is not the result of task A, so if B fails, A not (should) fail.
So, in this case, I added that I created new ciTests tasks for 'build.sbt'
lazy val ciTests = taskKey[Unit]("Run tests for CI")
ciTests := {
val testResult = (test in Test).result.value
}
Now, in Jenkins’s assignment, he builds a project using SBT using commands (using the SCOTEBE SBT plugin ):
update coverage ciTests coverageReport
This assembly will successfully ignore any failed tests. Therefore, the next build step to launch SonarRunner will begin the analysis of the Scala project and put the results into SonarQube.
@hugo-zwaal , , .