22title = " Spec"
33+++
44
5- A Pipeline needs ` .apiVersion ` , ` .kind ` , and ` .metadata ` fields.
5+ A Pipeline needs ` .version ` , ` .kind ` , and ` .metadata ` fields.
66
77A Pipeline also needs a ` .spec ` section.
88
99### Examples
1010
11- #### Pipeline which is stored entirely in Codefresh
11+ #### Basic Pipeline
1212``` yaml
13- apiVersion : " v1 "
13+ version : " 1.0 "
1414kind : " pipeline"
1515metadata :
16- name : " new -pipeline"
16+ name : " basic -pipeline"
1717 description : " my description"
1818 labels :
19- repo : " ArikMaor/ping-server"
2019 key1 : " value1"
21- project : " asd"
22-
20+ key2 : " value2"
2321spec :
2422 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"]
2827 branchRegex : ' .'
2928 contexts : []
3029 variables :
3130 - key : " PORT"
3231 value : 3000
3332 encrypted : false
34- - key : " PAPA "
35- value : " BLA BLA "
33+ - key : " SECRET "
34+ value : " secret-value "
3635 encrypted : true
3736 steps :
3837 clone_step :
@@ -56,57 +55,55 @@ spec:
5655
5756```
5857
59- #### Pipeline which is stored on a remote git
58+ #### Pipeline with a remote spec template brought from a git repository
6059``` yaml
61- apiVersion : " v1 "
60+ version : " 1.0 "
6261kind : " pipeline"
6362metadata :
64- name : " ew-pipeline-git"
65- labels :
66- repo : " ArikMaor/ping-server"
63+ name : " my-pipeline-1"
6764spec :
6865 triggers :
69- - type : " scm"
70- repo : " ArikMaor/ping-server"
66+ - type : " git"
67+ kind : " github"
68+ repo : " codefresh-io/cli"
7169 events : ["push", "pullrequest"]
7270 branchRegex : ' .'
7371 contexts : []
7472 variables :
7573 - key : " PORT"
7674 value : 3000
7775 encrypted : false
78- - key : " PAPA "
79- value : " BLA BLA "
76+ - key : " SECRET "
77+ value : " secret-value "
8078 encrypted : true
81- source :
79+ specTemplate :
8280 location : " git"
8381 repo : " codefresh-io/cli"
8482 path : " codefresh.yml"
8583` ` `
8684
87- #### Pipeline which is stored on a specific url
85+ #### Pipeline with a remote spec template brought from a git repository
8886` ` ` yaml
89- apiVersion : " v1 "
87+ version : " 1.0 "
9088kind : " pipeline"
9189metadata :
92- name : " new-pipeline-url"
93- labels :
94- repo : " codefresh-io/cli"
90+ name : " my-pipeline-1"
9591spec :
9692 triggers :
97- - type : " scm"
98- repo : " ArikMaor/ping-server"
93+ - type : " git"
94+ kind : " github"
95+ repo : " codefresh-io/cli"
9996 events : ["push", "pullrequest"]
10097 branchRegex : ' .'
10198 contexts : []
10299 variables :
103100 - key : " PORT"
104101 value : 3000
105102 encrypted : false
106- - key : " PAPA "
107- value : " BLA BLA "
103+ - key : " SECRET "
104+ value : " secret-value "
108105 encrypted : true
109- source :
106+ specTemplate :
110107 location : " url"
111108 url : " https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml"
112109` ` `
0 commit comments