You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-4Lines changed: 31 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,17 @@ one exposed by [GoCD API](https://api.gocd.org/current#get-pipeline-config).
64
64
The format of environment configuration files is much simpler,
65
65
you can find examples of correct environments at the [bottom](#environment).
66
66
67
+
### Format version
68
+
69
+
Please note that it is now recommended to declare `format_version` in each `*.gopipeline.json` or `*.goenvironment.json` file.
70
+
Version `2` will be most likely introduced in GoCD v17.12.
71
+
Currently it is recommended to declare consistent version in all your files:
72
+
```
73
+
{
74
+
"format_version" : 1
75
+
}
76
+
```
77
+
67
78
#### Implementation note
68
79
69
80
This plugin leverages JSON message format used internally for GoCD server
@@ -74,14 +85,15 @@ of reading a very long schema, below you can find examples of all configuration
74
85
75
86
It is exactly like documented [here](https://github.com/tomzo/documentation/blob/1133-configrepo-extension/developer/writing_go_plugins/configrepo/version_1_0/config_objects.md)
76
87
77
-
It is close to [official xml schema](https://docs.gocd.org/16.1.0/configuration/configuration_reference.html)
78
-
and also [official JSONs in pipeline configuration API](https://api.gocd.org/16.1.0/#get-pipeline-config)
88
+
It is **close to**[official xml schema](https://docs.gocd.org/16.1.0/configuration/configuration_reference.html)
89
+
and also [official JSONs in pipeline configuration API](https://api.gocd.org/current/#get-pipeline-config)
79
90
80
91
## JSON Configuration objects
81
92
82
93
1.[Environment](#environment)
83
94
1.[Environment variables](#environment-variables)
84
95
1.[Pipeline](#pipeline)
96
+
*[Locking](#pipeline-locking)
85
97
*[Mingle](#mingle)
86
98
*[Tracking tool](#tracking tool)
87
99
*[Timer](#timer)
@@ -156,10 +168,11 @@ Any variable must contain `name` and `value` or `encrypted_value`.
156
168
157
169
```json
158
170
{
171
+
"format_version" : 1,
159
172
"group": "group1",
160
173
"name": "pipe2",
161
174
"label_template": "foo-1.0-${COUNT}",
162
-
"enable_pipeline_locking": true,
175
+
"enable_pipeline_locking" : false,
163
176
"parameters": [
164
177
{
165
178
"name": "param",
@@ -188,10 +201,11 @@ Any variable must contain `name` and `value` or `encrypted_value`.
188
201
189
202
```json
190
203
{
204
+
"format_version" : 1,
191
205
"group": "group1",
192
206
"name": "pipe-with-template",
193
207
"label_template": "foo-1.0-${COUNT}",
194
-
"enable_pipeline_locking": true,
208
+
"enable_pipeline_locking" : false,
195
209
"template": "template1",
196
210
"parameters": [
197
211
{
@@ -209,6 +223,19 @@ Please note:
209
223
210
224
* Pipeline declares a group to which it belongs
211
225
226
+
### Pipeline locking
227
+
228
+
Expected since GoCD v17.12, you need to use `lock_behaviour` rather than `enable_pipeline_locking`.
229
+
```
230
+
"lock_behaviour" : "none"
231
+
```
232
+
233
+
`lock_behaviour` can be one of:
234
+
*`lockOnFailure` - same as `enable_pipeline_locking: true`
0 commit comments