Skip to content

Add `services:variables` to CI schema

Mireya Andres requested to merge add-services-variables-to-ci-yaml into master

What does this MR do and why?

For #389498 (comment 1266799283)

This adds the services:variables definition to the CI schema and additional tests for the services keywords.

Screenshots or screen recordings

Before After
Screenshot_2023-02-15_at_18.48.32 Screenshot_2023-02-15_at_18.47.54

How to set up and validate locally

  1. Go to the Pipeline Editor (CI/CD > Editor) and add the following to the .gitlab-ci.yml file.
    job:
      services:
        - name: bitnami/nginx
          alias: nginx
          variables:
            NGINX_HTTP_PORT_NUMBER: ${NGINX_HTTP_PORT_NUMBER}
      script: echo NGINX_HTTP_PORT_NUMBER
  2. When hovering over the services:variables keyword, the annotation should show up.

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 Mireya Andres

Merge request reports