Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-2677

Extend global-jjb python tox-sonar jobs for mvn params

Issue XMLXMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • Q1 2020 Tech Debt
    • None
    • None
    • None

      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}"
      

              cl778h Chris Lott
              cl778h Chris Lott
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: