2
2
title = " Spec"
3
3
+++
4
4
5
- A Pipeline needs ` .apiVersion ` , ` .kind ` , and ` .metadata ` fields.
5
+ A Pipeline needs ` .version ` , ` .kind ` , and ` .metadata ` fields.
6
6
7
7
A Pipeline also needs a ` .spec ` section.
8
8
9
9
### Examples
10
10
11
- #### Pipeline which is stored entirely in Codefresh
11
+ #### Basic Pipeline
12
12
``` yaml
13
- apiVersion : " v1 "
13
+ version : " 1.0 "
14
14
kind : " pipeline"
15
15
metadata :
16
- name : " new -pipeline"
16
+ name : " basic -pipeline"
17
17
description : " my description"
18
18
labels :
19
- repo : " ArikMaor/ping-server"
20
19
key1 : " value1"
21
- project : " asd"
22
-
20
+ key2 : " value2"
23
21
spec :
24
22
triggers :
25
- - type : " scm"
26
- repo : " ArikMaor/ping-server"
27
- events : ["push", "pullrequest"]
23
+ - type : " git"
24
+ kind : " github"
25
+ repo : " codefresh-io/cli"
26
+ events : ["push"]
28
27
branchRegex : ' .'
29
28
contexts : []
30
29
variables :
31
30
- key : " PORT"
32
31
value : 3000
33
32
encrypted : false
34
- - key : " PAPA "
35
- value : " BLA BLA "
33
+ - key : " SECRET "
34
+ value : " secret-value "
36
35
encrypted : true
37
36
steps :
38
37
clone_step :
@@ -56,57 +55,55 @@ spec:
56
55
57
56
```
58
57
59
- #### Pipeline which is stored on a remote git
58
+ #### Pipeline with a remote spec template brought from a git repository
60
59
``` yaml
61
- apiVersion : " v1 "
60
+ version : " 1.0 "
62
61
kind : " pipeline"
63
62
metadata :
64
- name : " ew-pipeline-git"
65
- labels :
66
- repo : " ArikMaor/ping-server"
63
+ name : " my-pipeline-1"
67
64
spec :
68
65
triggers :
69
- - type : " scm"
70
- repo : " ArikMaor/ping-server"
66
+ - type : " git"
67
+ kind : " github"
68
+ repo : " codefresh-io/cli"
71
69
events : ["push", "pullrequest"]
72
70
branchRegex : ' .'
73
71
contexts : []
74
72
variables :
75
73
- key : " PORT"
76
74
value : 3000
77
75
encrypted : false
78
- - key : " PAPA "
79
- value : " BLA BLA "
76
+ - key : " SECRET "
77
+ value : " secret-value "
80
78
encrypted : true
81
- source :
79
+ specTemplate :
82
80
location : " git"
83
81
repo : " codefresh-io/cli"
84
82
path : " codefresh.yml"
85
83
` ` `
86
84
87
- #### Pipeline which is stored on a specific url
85
+ #### Pipeline with a remote spec template brought from a git repository
88
86
` ` ` yaml
89
- apiVersion : " v1 "
87
+ version : " 1.0 "
90
88
kind : " pipeline"
91
89
metadata :
92
- name : " new-pipeline-url"
93
- labels :
94
- repo : " codefresh-io/cli"
90
+ name : " my-pipeline-1"
95
91
spec :
96
92
triggers :
97
- - type : " scm"
98
- repo : " ArikMaor/ping-server"
93
+ - type : " git"
94
+ kind : " github"
95
+ repo : " codefresh-io/cli"
99
96
events : ["push", "pullrequest"]
100
97
branchRegex : ' .'
101
98
contexts : []
102
99
variables :
103
100
- key : " PORT"
104
101
value : 3000
105
102
encrypted : false
106
- - key : " PAPA "
107
- value : " BLA BLA "
103
+ - key : " SECRET "
104
+ value : " secret-value "
108
105
encrypted : true
109
- source :
106
+ specTemplate :
110
107
location : " url"
111
108
url : " https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml"
112
109
` ` `
0 commit comments