Skip to content

Make CodeQuality CI template include merge requests

Problem to solve

When including Code Quality template together with Merge Request Pipelines, code quality doesn't run on Merged Request Pipelines.

Intended users

User experience goal

When setting up CodeQuality and Merge Request Pipeline, we should make it easy for the user to ensure code quality also runs on merge results pipelines. We can do this by adding it in the template, or adding a way to expand the template to cover this use case.

Proposal

Create an AddCodeQualityToMergeRequests.gitlab-ci.yml file, that just includes the override, to be used in addition to the normal Code-Quality.gitlab-ci.yml.

Further details

  1. No new configuration to learn. Wherever the docs say to include: CodeQuality.gitlab-ci.yml, we make a note to include the add-to-merge-requests expansion pack. But the user only has to use include.
  2. Easy to transition when we want to remove this new template once the original supports merge requests. Since both templates will be required to be used, if we apply this merge request down the road the exact behavior of the second file would move into the first file, and we could empty the second template so it has no behavior and people will stop using it. But there won't be any change in behavior for people who had both.

Permissions and Security

Documentation

Wherever the docs say to include: CodeQuality.gitlab-ci.yml, we make a note to include the add-to-merge-requests expansion pack. But the user only has to use include.

Availability & Testing

Available Tier

What does success look like, and how can we measure that?

Able to add codequality to merge results pipelines via the template.

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Scott Hampton