Provide variables for all the `only` and `except` possible entities
Description
We already have a simplified and a complex syntax for only
and except
keywords.
In %10.6 we are adding expressions for environment variables: https://gitlab.com/gitlab-org/gitlab-ce/issues/37397
For now the syntax is good, but not so powerful as we want. There are followup issues to add boolean logic and additional operators, and so they can be interesting also for other "entities" (refs and special keywords).
Proposal
Define environment variables for all the entities we can already use in only
and except
, if we don't already have, so we can use the variables syntax for all the other cases, and avoid specific support for anything outside variables.
Value | Description |
---|---|
branches | When a branch is pushed. |
tags | When a tag is pushed. |
api | When pipeline has been triggered by a second pipelines API (not triggers API). |
external | When using CI services other than GitLab. |
pipelines | For multi-project triggers, created using the API with CI_JOB_TOKEN. |
pushes | Pipeline is triggered by a git push by the user. |
schedules | For scheduled pipelines. |
triggers | For pipelines created using a trigger token. |
web | For pipelines created using Run pipeline button in GitLab UI (under your project's Pipelines). |