summaryrefslogtreecommitdiff
path: root/spec/frontend/editor/schema/ci/yaml_tests/positive_tests/rules.yml
blob: ef604f707b5c6e0dc4e9e517418720bced686367 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# valid workflow:rules:changes
rules:changes with paths and compare_to properties:
  script: exit 0
  rules:
    - changes:
        paths:
          - README.md
        compare_to: main

rules:changes as array of strings:
  script: exit 0
  rules:
    - changes:
      - README.md

# valid workflow:rules:exists
# valid rules:changes:path
# valid workflow:name
workflow:
  name: 'Pipeline name'
  rules:
    - changes:
        paths:
          - README.md
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      exists:
        - Dockerfile
      variables:
        IS_A_FEATURE: 'true'
      when: always