Skip to content

Commit

Permalink
Update documentation with pipeline entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Itai Gendler authored and Itai Gendler committed Jan 13, 2018
1 parent 854ec3a commit 69a47f3
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 99 deletions.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

5 changes: 3 additions & 2 deletions docs-template/content/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ title: Authentication

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

Once you have the API key, create a new authentication context:<br> `codefresh auth create-context --api-key {API_KEY}`

## Advanced Usage
130 changes: 93 additions & 37 deletions docs-template/content/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,112 @@ weight: 40
title: Pipelines
---

# Kittens
# Pipelines

## Get All Kittens
## Get All Pipelines

```cli
package main
$ codefresh get pipelines
```

import "github.com/bep/kittn/auth"
```string
ID NAME REPOOWNER REPONAME
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
55fa65a21058fb6778dc5f19 repo-analyser verchol repo-analyser
55fa65a21058fb6778dc5f4f engine codefresh-io engine
55fa65a21058fb6778dc5f55 git-clone codefresh-io cf-base-images
```

func main() {
api := auth.Authorize("meowmeowmeow")
```cli
$ codefresh get pipelines --name engine
```

_ = api.GetKittens()
}
```string
ID NAME REPOOWNER REPONAME
55fa65a21058fb6778dc5f4f engine codefresh-io engine
```

> The above command returns JSON structured like this:
```cli
$ codefresh get pipelines --repo-name repo-analyser
```

```json
[
{
"id": 1,
"name": "Fluffums",
"breed": "calico",
"fluffiness": 6,
"cuteness": 7
},
{
"id": 2,
"name": "Max",
"breed": "unknown",
"fluffiness": 5,
"cuteness": 10
}
]
```string
ID NAME REPOOWNER REPONAME
55fa65a21058fb6778dc5f19 repo-analyser verchol repo-analyser
```

This endpoint retrieves all kittens.
```cli
$ codefresh get pipelines --repo-owner codefresh-io
```

```string
ID NAME REPOOWNER REPONAME
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
55fa65a21058fb6778dc5f4f engine codefresh-io engine
55fa65a21058fb6778dc5f55 git-clone codefresh-io cf-base-images
```

This command will retrieve an array of pipelines according to the passed filters.

### Command

`codefresh get pipelines`<br>

### Aliases

<ul>
<li>pipeline</li>
<li>pip</li>
</ul>

### Filter Options

Option | Default | Description
--------- | ----------- | -----------
--repo-owner | | Filter pipelines by repository owner.
--repo-name | | Filter pipelines by repository name.
--name | | Filter pipelines by pipeline name.

### Output Options

Option | Default | Description
--------- | ----------- | -----------
--output | | Output format [choices: "json", "yaml", "wide", "name"].
--watch | false | If set to true, the output will continue to get updated.
--watch-interval | 3 | Interval time to get updates from the server.
--limit | 25 | Limit amount of returned results.
--page | 1 | Get a specific set of results according to the defined limit option.


## Get a Single Pipeline

```cli
$ codefresh get pipeline 55fa65a21058fb6778dc5eef
```

> The above command returns a structured table like this:
```string
ID NAME REPOOWNER REPONAME
55fa65a21058fb6778dc5eef codefresh-io codefresh-io codefresh-io
```

This command will retrieve a single pipeline.

### Command

### HTTP Request
`codefresh get pipeline {ID}`

`GET http://example.com/api/kittens`
### Positionals arguments

### Query Parameters
Argument | Description
--------- | -----------
id | Pipeline id.

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

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

0 comments on commit 69a47f3

Please sign in to comment.