Skip to content

Add CI string validation to trigger:project

Leaminn Ma requested to merge 373058-trigger-project-validation into master

What does this MR do and why?

We don't document that trigger:project can be an array but we in-consistently enforce that it can only be a string. The following config is valid but shouldn't be.

job:
  trigger: 
    project: [group-a/project-5]

This MR adds string validation to trigger:project.

Screenshots or screen recordings

  • Old behaviour: Validation passes

Screenshot_2022-12-16_at_9.50.09_AM

  • New behaviour: Shows validation error

Screenshot_2022-12-16_at_10.53.47_AM

How to set up and validate locally

  1. In your project's CI/CD editor, test that the following config gives a validation error indicating the value should be a string.
job:
  trigger: 
    project: [group-a/project-5]

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

Edited by Leaminn Ma

Merge request reports