-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
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.