-
Story
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
All / Cross Project
Extend Python sonar jobs that use macro lf_tox_sonar to accept mvn-opts, mvn-params and mvn-version.
O-RAN recently hit this use case. A Python project is in a subdirectory of a git repo. The Python job configurations use tox-dir to make the Python parts work fine. During the sonar job, after Python finishes generating the coverage data, maven invokes the sonar-maven-plugin to collect unit-test coverage reports and push the data to SonarCloud. By default maven runs in the repo root directory, so the job fails because the coverage.xml file is not found.
In a typical Maven job I would just add "-f subdir" to the mvn-params item and all would be well, but adding that configuration parameter has no effect because macro lf_tox_sonar lacks the parameter block shown below.
- lf-infra-maven-parameters: mvn-opts: "{mvn-opts}" mvn-params: "{mvn-params}" mvn-version: "{mvn-version}"
- clones
-
RELENG-2359 Repair global-jjb python tox-sonar jobs for Sonar analyses
- Done