Skip to content

Support for boolean OR runner tags specification in .gitlab-ci.yml

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

Currently, all runner tags are AND'ed together. I would like to have support for OR'ing them too.

The only way to do this currently is to define yet another label, which is more than we need 😄

Proposal

Additional syntax in the YAML file could look something like:

example1:
  tags:
      - tag1
      - tag3
      - [tag2, tag4]
      - [tag6, tag5]

Tags defined in an array would be then combined with OR operator, so the config above would evaluate to tag1 AND tag3 AND (tag2 OR tag4) AND (tag6 OR tag5)

Current workarounds / pain points

Currently a user could define tags for all combinations to solve for this problem. This method can lead to tag sprawl and/or make it hard to read the .gitlab-ci.yml if there are a large number of tags.

Links / references

Edited by 🤖 GitLab Bot 🤖