meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git:gitlab:ci:yaml:rules [2024/01/18 13:12] – niziak | git:gitlab:ci:yaml:rules [2025/01/03 14:06] (current) – niziak | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| [[https:// | [[https:// | ||
| + | ===== conditional variables ===== | ||
| + | |||
| + | <code yaml> | ||
| + | build: | ||
| + | rules: | ||
| + | - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | ||
| + | variables: | ||
| + | CCACHE_DISABLE: | ||
| + | - if: $CI_COMMIT_TAG | ||
| + | variables: | ||
| + | CCACHE_DISABLE: | ||
| + | </ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | <code yaml> | ||
| + | workflow: | ||
| + | rules: | ||
| + | - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | ||
| + | variables: | ||
| + | CCACHE_DISABLE: | ||
| + | CACHE_CCACHE_POLICY: | ||
| + | - if: $CI_COMMIT_TAG | ||
| + | variables: | ||
| + | CCACHE_DISABLE: | ||
| + | CACHE_CCACHE_POLICY: | ||
| + | - when: always | ||
| + | |||
| + | .ccache: & | ||
| + | key: cache-ccache | ||
| + | paths: | ||
| + | - .ccache | ||
| + | policy: ${CACHE_CCACHE_POLICY} | ||
| + | |||
| + | |||
| + | .build-target: | ||
| + | cache: | ||
| + | - <<: *cache-ccache | ||
| + | |||
| + | </ | ||
| ===== negate glob? ===== | ===== negate glob? ===== | ||
| Line 26: | Line 68: | ||
| Ruby's fnmatch is used to handle patterns. It doesn' | Ruby's fnmatch is used to handle patterns. It doesn' | ||
| - | To write rule to do not match changes in '' | + | |
| + | To write rule to do not match changes in < | ||
| <code yaml> | <code yaml> | ||
| rules: | rules: | ||
| - changes: | - changes: | ||
| - " | - " | ||
| + | - " | ||
| + | </ | ||
| + | |||
| + | Note: second pattern '' | ||
| + | More, to exclude '' | ||
| + | |||
| + | <code yaml> | ||
| + | rules: | ||
| + | - changes: | ||
| + | - " | ||
| + | - " | ||
| </ | </ | ||
| - | More: | + | More about: |
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||