Skip to content

Add pipeline name to emails

What does this MR do and why?

Resolves #388929 (closed)

If a pipeline uses the workflow::name attribute, then use the pipeline name instead of the id in the email notifications for:

  • successful pipelines
  • failed pipelines
  • fixed pipelines

Screenshots or screen recordings

Failed Pipeline

Before After
Screenshot_2023-06-19_at_2.17.27_PM Screenshot_2023-06-19_at_12.58.11_PM
Screenshot_2023-06-19_at_2.17.07_PM Screenshot_2023-06-19_at_1.06.53_PM

Successful Pipeline

Before After
Screenshot_2023-06-19_at_1.25.59_PM Screenshot_2023-06-19_at_2.00.04_PM
Screenshot_2023-06-19_at_1.26.06_PM Screenshot_2023-06-19_at_2.06.17_PM

Fixed Pipeline

Before After
Screenshot_2023-06-19_at_1.42.49_PM Screenshot_2023-06-19_at_1.55.03_PM
Screenshot_2023-06-19_at_2.21.48_PM Screenshot_2023-06-19_at_2.06.30_PM

How to set up and validate locally

  1. Choose a project in your local GDK where you can run a CI pipeline.

  2. Modify the .gitlab-ci.yml file to add a workflow:name. https://docs.gitlab.com/ee/ci/yaml/index.html#workflowname
    For example:

    workflow:
      name: "Missy's Test"
  3. Start a pipeline (Note: Rails mailer previews should use the last record for Ci::Pipeline)

  4. Use the rails mailer previews to verify the pipeline name shows in the emails instead of the id for the:

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 Missy Davies

Merge request reports