blob: 8a12cdf4f1518dacf004bf619441e7fbcab75356 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# Covers https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95469
# Test cases:
# - include file from project
# - trigger pipeline from project, 3 forms (see schema at ci.json)
#
# Sub-cases - forms of project path:
# - common case: group/project
# - sub-group: group/sub-group/project
# - variable: $FOO
# - variable in string: group/$VAR/project
# - invalid variable: $.
# (testing regex, that does not validate variable names)
# BEGIN CASE: include yml from project
include:
- project: 'group/project'
file: '/templates/.gitlab-ci-template.yml'
- project: 'group/sub-group/project'
file: '/templates/.gitlab-ci-template.yml'
- project: '$FOO'
file: '/templates/.gitlab-ci-template.yml'
- project: 'group/$VAR/project'
file: '/templates/.gitlab-ci-template.yml'
- project: '$.'
file: '/templates/.gitlab-ci-template.yml'
# END CASE
# BEGIN CASE: trigger minimal
trigger-minimal:
trigger: 'group/project'
trigger-minimal-sub-group:
trigger: 'group/sub-group/project'
trigger-minimal-variable:
trigger: '$FOO'
trigger-minimal-variable-in-string:
trigger: 'group/$VAR/project'
trigger-minimal-invalid-variable:
trigger: '$.'
# END CASE
# BEGIN CASE: trigger project
trigger-project:
trigger:
project: 'group/project'
trigger-project-sub-group:
trigger:
project: 'group/sub-group/project'
trigger-project-variable:
trigger:
project: '$FOO'
trigger-project-variable-in-string:
trigger:
project: 'group/$VAR/project'
trigger-project-invalid-variable:
trigger:
project: '$.'
# END CASE
# BEGIN CASE: trigger file
trigger-include:
trigger:
include:
- project: 'group/project'
file: '/path/to/child-pipeline.yml'
trigger-include-sub-group:
trigger:
include:
- project: 'group/sub-group/project'
file: '/path/to/child-pipeline.yml'
trigger-include-variable:
trigger:
include:
- project: '$FOO'
file: '/path/to/child-pipeline.yml'
trigger-include-variable-in-string:
trigger:
include:
- project: 'group/$VAR/project'
file: '/path/to/child-pipeline.yml'
trigger-include-invalid-variable:
trigger:
include:
- project: '$.'
file: '/path/to/child-pipeline.yml'
# END CASE
|