forked from ringcentral/slate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from kierarad/master
Add pipeline config export (to config repo) endpoint documentation
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## Export pipeline config to config repo format | ||
|
||
```shell | ||
$ curl 'http://ci.example.com/go/api/admin/export/pipelines/pip1?pluginId=yaml.config.plugin' \ | ||
-u 'username:password' \ | ||
-H 'Accept: application/vnd.go.cd.v1+json' \ | ||
|
||
``` | ||
|
||
> The above command returns YML structured like this: | ||
|
||
```http | ||
HTTP/1.1 200 OK | ||
Content-Type: application/x-yaml; charset=utf-8 | ||
ETag: "92d3496403f7a3240fc0ba8895c5abfef24a72255360ebf1c04b4eb304a63eaa" | ||
Content-Disposition: attachment; filename="pip1.gocd.yaml" | ||
``` | ||
|
||
```yaml | ||
format_version: 3 | ||
pipelines: | ||
pip1: | ||
group: second | ||
label_template: ${COUNT} | ||
lock_behavior: none | ||
materials: | ||
git: | ||
git: foo | ||
shallow_clone: false | ||
auto_update: true | ||
branch: master | ||
stages: | ||
- defaultStage: | ||
fetch_materials: true | ||
keep_artifacts: false | ||
clean_workspace: false | ||
approval: | ||
type: success | ||
jobs: | ||
defaultJob: | ||
timeout: 0 | ||
tasks: | ||
- nant: | ||
run_if: passed | ||
``` | ||
|
||
Exports pipeline configurations into a format consumable by the specified config repo plugin. | ||
|
||
|
||
<%= available_since('19.1.0') %> | ||
|
||
<p class='http-request-heading'>HTTP Request</p> | ||
|
||
`GET /go/api/admin/export/pipelines/:pipeline_name` | ||
|
||
<p class='http-request-return-description'>Returns</p> | ||
|
||
The format and contents of the response as well as the `Content-Type` are determined by the specified config repo plugin. |