Skip to content

Add updated workflow rules to json schema

This is brought up in an internal slack discussion: https://gitlab.slack.com/archives/C019R5JD44E/p1635774980047700?thread_ts=1634903151.008400&cid=C019R5JD44E

The following .gitlab-ci.yml content will result in syntax errors in the pipeline editor:

workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      changes:
        - Dockerfile

image

There are missing definitions for workflow: rules in the json schema.

We can use the documentation changes from !73940 (merged) as a reference.

Missing Keywords

We need to add the following definitions under workflow:

  • rules:changes
  • rules:exists
  • Make sure when can only use always or never when used under the workflow context
Edited by Mireya Andres