Skip to content

Support conditional includes with exists

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Release notes

Problem to solve

Today it is possible to use rules:if as part of include blocks in pipelines. This is great but doesn't expose the full power of rules available with other keywords, such as exists.

Proposal

Allow the exists keywords to be used as part of an include:rules block:

include:
  - local: builds_docker.yml
    rules:
      - exists:
          - Dockerfile

test:
  stage: test
  script: exit 0
Edited by 🤖 GitLab Bot 🤖