Skip to content

Draft: POC for adding titles to pipelines

Reuben Pereira requested to merge rp/pipeline-titles into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Changes:

  • Add ci_pipeline_details table to store title data.
  • Allow title to be defined in workflow:rules in .gitlab-ci.yml, with a max length of 50 chars. The 50 character limit is an arbitrary one.
  • Allow variables to be used in the title.
  • Display title on pipeline list and details pages.
  • Allow pipelines to be filtered by title on list page.

SQL queries:

  1. SQL query when filtering by title: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/11689/commands/41612.

TODO:

  1. Update CI schema file: app/assets/javascripts/editor/schema/ci.json.
  2. Display title on details page only if pipeline has title.
  3. Create API to obtain all unique titles in a project.
  4. Use above API to offer suggestions when filtering pipelines by title.
  5. Add specs.

#372538 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Workflow rules in .gitlab-ci.yml file: Screenshot_from_2022-08-26_16-31-28

Pipeline list page: Screenshot_from_2022-08-26_16-29-40_1

Pipeline details page: Screenshot_from_2022-08-26_16-30-27_1

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Checkout rp/pipeline-titles in your GDK/GCK.
  2. Modify the .gitlab-ci.yml file of a project to add title under workflow:rules. See the screenshots above to see examples.
  3. Run a pipeline that will trigger the workflow:rule with the title.

MR acceptance checklist

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

Edited by Reuben Pereira

Merge request reports