Skip to content

Update CI error message when pipeline has no jobs to run

Leaminn Ma requested to merge 204756-update-ci-no-jobs-error-msg into master

What does this MR do and why?

Updates the CI error message for the situation when no jobs can be run due to the rules configuration. This is to help the user with debugging their pipeline.

Old message: No stages / jobs for this pipeline

New message: Pipeline will not run for the selected trigger. The rules configuration prevented any jobs from being added to the pipeline.

Screenshots or screen recordings

  • Old message:

Screenshot_2022-12-16_at_1.56.32_PM

  • New message:

Screenshot_2022-12-16_at_2.47.54_PM

How to set up and validate locally

  1. Create your project's .gitlab-ci.yml file with the following contents:
job:
  script: exit 0
  rules:
    - if: $TESTVAR == "test"
  1. Go to CI/CD > Pipelines and click Run pipeline
  2. Observe that the error message displayed is: Screenshot_2022-12-16_at_2.47.54_PM

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 #204756 (closed)

Edited by Leaminn Ma

Merge request reports