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

Sonar gerrit comment trigger behavior differs Maven vs Python jobs

Issue XMLXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Global JJB
    • None
    • All / Cross Project

      Should a posted comment "run-sonar" to trigger a Sonar job be filtered on contents of the gerrit change where the comment is posted? Maven job says no, Python job says yes. I would like to see consistency. I can make whatever change we agree upon.

      In lf-maven-jobs.yaml the maven template has a comment-based trigger with no file path filter on its sonar template, starting line 1182:

          triggers:       - timed: "{obj:cron}"
            - gerrit:           server-name: "{gerrit-server-name}"
                trigger-on: "{obj:gerrit_sonar_triggers}"
                projects:             - project-compare-type: "ANT"
                    project-pattern: "{project}"
                    branches:                 - branch-compare-type: "ANT"
                        branch-pattern: "**/master"
                skip-vote:             successful: true
                  failed: true
                  unstable: true
                  notbuilt: true
       

      In lf-python-jobs.yaml the python template has a comment-based trigger WITH a file path filter on its sonar template, starting line 363:

       triggers:       - timed: "{obj:cron}"
            - gerrit:           server-name: "{gerrit-server-name}"
                trigger-on: "{obj:gerrit_sonar_triggers}"
                projects:             - project-compare-type: "ANT"
                    project-pattern: "{project}"
                    branches:                 - branch-compare-type: "ANT"
                        branch-pattern: "**/{branch}"
                    file-paths: "{obj:gerrit_trigger_file_paths}"
                skip-vote:             successful: true
                  failed: true
                  unstable: true
                  notbuilt: true
      

      In both cases the trigger definition gerrit_sonar_triggers contains a regex for a Gerrit comment only.

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

                Created:
                Updated: