Skip to content

Add ability to fix when project is missing gitlab-ci.yml file

What does this MR do and why?

When there is no .gitlab-ci.yml file in a project and it tries to run a compliance pipeline, the pipeline will now show a specific error and a button so that user can easily add the missing .gitlab-ci.yml file

Screenshots or screen recordings

Missing gitlab-ci.yml file Error Alert

Pipeline--Gitlab-Org-Missing-yaml--GitLab__1_

All other Errors Alert

Pipeline--Gitlab-Org-Compliance-testing-No-yaml-test--GitLab__1_

Add missing file demo

Pipeline--Gitlab-Org-Compliance-testing-No-yaml-test--GitLab

How to set up and validate locally

  1. Create a project in a group
  2. Add a compliance pipeline yaml file to the project https://docs.gitlab.com/ee/user/group/compliance_frameworks.html#configure-a-compliance-pipeline
    1. Example https://gitlab.com/sam-s-test-group/compliance-testing-group/compliance-pipeline-test/compliance-framework/-/blob/main/.compliance-gitlab-ci.yml
  3. Create a new compliance framework in the group, use the project compliance yaml file and set as default https://docs.gitlab.com/ee/user/group/compliance_frameworks.html
    1. Example https://gitlab.com/groups/sam-s-test-group/-/compliance_frameworks/3178/edit
  4. Create a new project and it should have the compliance framework label already set
  5. Go to CI/CD -> Pipelines from main left menu
  6. There should be one failed pipeline, click on it
  7. Confirm the Alert update
  8. Click on "Add file" button and confirm that an MR is created to add .gitlab-ci.yml file

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #378854 (closed)

Edited by Nate Rosandich

Merge request reports