@@ -8,102 +8,181 @@ A Pipeline also needs a `.spec` section.
8
8
9
9
### Examples
10
10
11
- #### Basic Pipeline
11
+ #### Basic Pipeline with implicit clone step (will checkout connected repo automatically)
12
+
13
+ ``` yaml
14
+ version : ' 1.0'
15
+ kind : pipeline
16
+ metadata :
17
+ name : codefresh-io/cli/default-pipeline
18
+ labels :
19
+ tags : []
20
+ deprecate :
21
+ applicationPort : ' 8080'
22
+ repoPipeline : true
23
+ spec :
24
+ triggers :
25
+ - type : git
26
+ repo : codefresh-io/cli
27
+ events :
28
+ - push.heads
29
+ pullRequestAllowForkEvents : false
30
+ commentRegex : /.*/gi
31
+ branchRegex : /.*/gi
32
+ branchRegexInput : regex
33
+ provider : github
34
+ contexts : []
35
+ variables :
36
+ - key : PORT
37
+ value : ' 3000'
38
+ - key : SECRET
39
+ value : ' secret-value'
40
+ encrypted : true
41
+ steps :
42
+ test_step_1 :
43
+ image : alpine
44
+ working_directory : ' ${{clone_step}}'
45
+ commands :
46
+ - echo ls
47
+ - echo "hello world"
48
+ - echo "plain value $PORT"
49
+ - echo "encrypted value $PAPA"
50
+ - echo "value from context $COOKIE"
51
+ build :
52
+ type : build
53
+ working_directory : ' ${{clone_step}}'
54
+ dockerfile : ./Dockerfile
55
+ image_name : my-custom-docker-image
56
+ tag : foo
57
+ stages : []
58
+ ` ` `
59
+
60
+ #### Basic Pipeline with explicit clone step
61
+
12
62
` ` ` yaml
13
- version : " 1.0"
14
- kind : " pipeline"
63
+ version : ' 1.0'
64
+ kind : pipeline
15
65
metadata :
16
- name : " basic-pipeline"
17
- description : " my description"
66
+ name : codefresh-io/cli/basic-pipeline
18
67
labels :
19
- key1 : " value1"
20
- key2 : " value2"
68
+ tags : []
69
+ deprecate :
70
+ applicationPort : ' 8080'
71
+ repoPipeline : true
21
72
spec :
22
73
triggers :
23
- - type : " git"
24
- provider : " github"
25
- repo : " codefresh-io/cli"
26
- events : ["push"]
27
- branchRegex : ' /./'
74
+ - type : git
75
+ repo : codefresh-io/cli
76
+ events :
77
+ - push.heads
78
+ pullRequestAllowForkEvents : false
79
+ commentRegex : /.*/gi
80
+ branchRegex : /.*/gi
81
+ branchRegexInput : regex
82
+ provider : github
28
83
contexts : []
29
84
variables :
30
- - key : " PORT"
31
- value : 3000
32
- encrypted : false
33
- - key : " SECRET"
34
- value : " secret-value"
85
+ - key : PORT
86
+ value : ' 3000'
87
+ - key : SECRET
88
+ value : ' secret-value'
35
89
encrypted : true
36
90
steps :
37
91
clone_step :
38
- repo : github.com/nodejs/node
92
+ repo : codefresh-contrib/python-flask-sample-app
39
93
revision : master
94
+ type : git-clone
95
+ git : CF-default
40
96
test_step_1 :
41
- image : " alpine"
42
- working_directory : ${{clone_step}}
97
+ image : alpine
98
+ working_directory : ' ${{clone_step}}'
43
99
commands :
44
- - echo ls
45
- - echo "hello world"
46
- - echo "plain value $PORT"
47
- - echo "encrypted value $PAPA"
48
- - echo "value from context $COOKIE"
100
+ - echo ls
101
+ - echo "hello world"
102
+ - echo "plain value $PORT"
103
+ - echo "encrypted value $PAPA"
104
+ - echo "value from context $COOKIE"
49
105
build :
50
106
type : build
51
- working_directory : ${{clone_step}}
107
+ working_directory : ' ${{clone_step}}'
52
108
dockerfile : ./Dockerfile
53
- image_name : itai/test
109
+ image_name : my-custom-docker-image
54
110
tag : bla
55
-
111
+ stages : []
56
112
` ` `
57
113
58
114
#### Pipeline with a remote spec template brought from a git repository
59
115
` ` ` yaml
60
- version : " 1.0"
61
- kind : " pipeline"
116
+ version : ' 1.0'
117
+ kind : pipeline
62
118
metadata :
63
- name : " my-pipeline"
119
+ name : codefresh-io/cli/from-repo
120
+ isPublic : false
121
+ labels :
122
+ tags : []
123
+ deprecate :
124
+ applicationPort : ' 8080'
125
+ repoPipeline : true
64
126
spec :
65
127
triggers :
66
- - type : " git"
67
- provider : " github"
68
- repo : " codefresh-io/cli"
69
- events : ["push"]
70
- branchRegex : ' /./'
128
+ - type : git
129
+ repo : codefresh-io/cli
130
+ events :
131
+ - push.heads
132
+ pullRequestAllowForkEvents : false
133
+ commentRegex : /.*/gi
134
+ branchRegex : /.*/gi
135
+ branchRegexInput : regex
136
+ provider : github
71
137
contexts : []
72
138
variables :
73
- - key : " PORT"
74
- value : 3000
75
- encrypted : false
76
- - key : " SECRET"
77
- value : " secret-value"
139
+ - key : PORT
140
+ value : ' 3000'
141
+ - key : SECRET
142
+ value : ' secret-value'
78
143
encrypted : true
79
144
specTemplate :
80
- location : " git"
81
- repo : " codefresh-io/cli"
82
- path : " codefresh.yml"
145
+ location : git
146
+ repo : codefresh-io/cli
147
+ path : codefresh.yml
148
+ steps : {}
149
+ stages : []
83
150
` ` `
84
151
85
152
#### Pipeline with a remote spec template brought from a git repository
86
153
` ` ` yaml
87
- version : " 1.0"
88
- kind : " pipeline"
154
+ version : ' 1.0'
155
+ kind : pipeline
89
156
metadata :
90
- name : " my-pipeline"
157
+ name : codefresh-io/cli/from-external
158
+ isPublic : false
159
+ labels :
160
+ tags : []
161
+ deprecate :
162
+ applicationPort : ' 8080'
163
+ repoPipeline : true
164
+ project : codefresh-io/cli
91
165
spec :
92
166
triggers :
93
- - type : " git"
94
- provider : " github"
95
- repo : " codefresh-io/cli"
96
- events : ["push"]
97
- branchRegex : ' /./'
167
+ - type : git
168
+ repo : codefresh-io/cli
169
+ events :
170
+ - push.heads
171
+ pullRequestAllowForkEvents : false
172
+ commentRegex : /.*/gi
173
+ branchRegex : /.*/gi
174
+ branchRegexInput : regex
175
+ provider : github
98
176
contexts : []
99
177
variables :
100
- - key : " PORT"
101
- value : 3000
102
- encrypted : false
103
- - key : " SECRET"
104
- value : " secret-value"
178
+ - key : PORT
179
+ value : ' 3000'
180
+ - key : SECRET
181
+ value : ' secret-value'
105
182
encrypted : true
106
183
specTemplate :
107
- location : " url"
108
- url : " https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml"
184
+ location : url
185
+ url : ' https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml'
186
+ steps : {}
187
+ stages : []
109
188
` ` `
0 commit comments