Commit ab397b36 authored by Evan Read's avatar Evan Read

Merge branch 'clarify-only-except-docs' into 'master'

Added an example to doumentation for using multiple build policies with only: and except:

See merge request gitlab-org/gitlab-ce!31983
parents db8f391e cdabb9d5
...@@ -518,10 +518,24 @@ Four keys are available: ...@@ -518,10 +518,24 @@ Four keys are available:
- `changes` - `changes`
- `kubernetes` - `kubernetes`
If you use multiple keys under `only` or `except`, they act as an AND. The logic is: If you use multiple keys under `only` or `except`, the keys will be evaluated as a
single conjoined expression. That is:
- `only:` means "include this job if all of the conditions match".
- `except:` means "exclude this job if any of the conditions match".
The the individual keys are logically joined by an AND:
> (any of refs) AND (any of variables) AND (any of changes) AND (if kubernetes is active) > (any of refs) AND (any of variables) AND (any of changes) AND (if kubernetes is active)
`except` is implemented as a negation of this complete expression:
> NOT((any of refs) AND (any of variables) AND (any of changes) AND (if kubernetes is active))
This, more intuitively, means the keys join by an OR. A functionally equivalent expression:
> (any of refs) OR (any of variables) OR (any of changes) OR (if kubernetes is active)
#### `only:refs`/`except:refs` #### `only:refs`/`except:refs`
> `refs` policy introduced in GitLab 10.0. > `refs` policy introduced in GitLab 10.0.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment