Skip to content

Commit 69a47f3

Browse files
Itai GendlerItai Gendler
authored andcommitted
Update documentation with pipeline entity
1 parent 854ec3a commit 69a47f3

File tree

7 files changed

+286
-99
lines changed

7 files changed

+286
-99
lines changed

_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs-template/content/authentication.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ title: Authentication
77

88
## Basic Usage
99
In order to start working with the cli you will need to update the authentication configuration. <br />
10-
Generate a new API key through the <a href="https://g.codefresh.io/account/tokens" target="_blank">account settings</a> page. <br />
11-
Once you have the API key, create a new authentication context: `codefresh auth create-context --api-key {API_KEY}`
10+
Generate a new API key through the <a href="https://g.codefresh.io/account/tokens" target="_blank">account settings</a> page.
11+
12+
Once you have the API key, create a new authentication context:<br> `codefresh auth create-context --api-key {API_KEY}`
1213

1314
## Advanced Usage

docs-template/content/pipelines.md

Lines changed: 93 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,112 @@ weight: 40
33
title: Pipelines
44
---
55

6-
# Kittens
6+
# Pipelines
77

8-
## Get All Kittens
8+
## Get All Pipelines
99

1010
```cli
11-
package main
11+
$ codefresh get pipelines
12+
```
1213

13-
import "github.com/bep/kittn/auth"
14+
```string
15+
ID NAME REPOOWNER REPONAME
16+
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
17+
55fa65a21058fb6778dc5f19 repo-analyser verchol repo-analyser
18+
55fa65a21058fb6778dc5f4f engine codefresh-io engine
19+
55fa65a21058fb6778dc5f55 git-clone codefresh-io cf-base-images
20+
```
1421

15-
func main() {
16-
api := auth.Authorize("meowmeowmeow")
22+
```cli
23+
$ codefresh get pipelines --name engine
24+
```
1725

18-
_ = api.GetKittens()
19-
}
26+
```string
27+
ID NAME REPOOWNER REPONAME
28+
55fa65a21058fb6778dc5f4f engine codefresh-io engine
2029
```
2130

22-
> The above command returns JSON structured like this:
31+
```cli
32+
$ codefresh get pipelines --repo-name repo-analyser
33+
```
2334

24-
```json
25-
[
26-
{
27-
"id": 1,
28-
"name": "Fluffums",
29-
"breed": "calico",
30-
"fluffiness": 6,
31-
"cuteness": 7
32-
},
33-
{
34-
"id": 2,
35-
"name": "Max",
36-
"breed": "unknown",
37-
"fluffiness": 5,
38-
"cuteness": 10
39-
}
40-
]
35+
```string
36+
ID NAME REPOOWNER REPONAME
37+
55fa65a21058fb6778dc5f19 repo-analyser verchol repo-analyser
4138
```
4239

43-
This endpoint retrieves all kittens.
40+
```cli
41+
$ codefresh get pipelines --repo-owner codefresh-io
42+
```
43+
44+
```string
45+
ID NAME REPOOWNER REPONAME
46+
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
47+
55fa65a21058fb6778dc5f4f engine codefresh-io engine
48+
55fa65a21058fb6778dc5f55 git-clone codefresh-io cf-base-images
49+
```
50+
51+
This command will retrieve an array of pipelines according to the passed filters.
52+
53+
### Command
54+
55+
`codefresh get pipelines`<br>
56+
57+
### Aliases
58+
59+
<ul>
60+
<li>pipeline</li>
61+
<li>pip</li>
62+
</ul>
63+
64+
### Filter Options
65+
66+
Option | Default | Description
67+
--------- | ----------- | -----------
68+
--repo-owner | | Filter pipelines by repository owner.
69+
--repo-name | | Filter pipelines by repository name.
70+
--name | | Filter pipelines by pipeline name.
71+
72+
### Output Options
73+
74+
Option | Default | Description
75+
--------- | ----------- | -----------
76+
--output | | Output format [choices: "json", "yaml", "wide", "name"].
77+
--watch | false | If set to true, the output will continue to get updated.
78+
--watch-interval | 3 | Interval time to get updates from the server.
79+
--limit | 25 | Limit amount of returned results.
80+
--page | 1 | Get a specific set of results according to the defined limit option.
81+
82+
83+
## Get a Single Pipeline
84+
85+
```cli
86+
$ codefresh get pipeline 55fa65a21058fb6778dc5eef
87+
```
88+
89+
> The above command returns a structured table like this:
90+
91+
```string
92+
ID NAME REPOOWNER REPONAME
93+
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
94+
```
95+
96+
This command will retrieve a single pipeline.
97+
98+
### Command
4499

45-
### HTTP Request
100+
`codefresh get pipeline {ID}`
46101

47-
`GET http://example.com/api/kittens`
102+
### Positionals arguments
48103

49-
### Query Parameters
104+
Argument | Description
105+
--------- | -----------
106+
id | Pipeline id.
50107

51-
Parameter | Default | Description
52-
--------- | ------- | -----------
53-
include_cats | false | If set to true, the result will also include cats.
54-
available | true | If set to false, the result will include kittens that have already been adopted.
108+
### Output Options
55109

56-
<aside class="success">
57-
Remember — a happy kitten is an authenticated kitten!
58-
</aside>
110+
Option | Default | Description
111+
--------- | ----------- | -----------
112+
--output | | Output format [choices: "json", "yaml", "wide", "name"].
113+
--watch | false | If set to true, the output will continue to get updated.
114+
--watch-interval | 3 | Interval time to get updates from the server.

0 commit comments

Comments
 (0)