Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
egegunes committed Dec 15, 2019
1 parent 5a974b2 commit 5faecc6
Showing 1 changed file with 64 additions and 12 deletions.
76 changes: 64 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,49 @@ but Gitlab lacks this feature. There is a 4 years old
[issue](https://gitlab.com/gitlab-org/gitlab/issues/7861) (and it's still
alive). This is the reason of this tool's existence.

## Installation

[Download](https://github.com/egegunes/gitlabci/releases) the binary for your operating system.

## Config

`gitlabci` looks for its configuration file in three places:

1. $HOME/.gitlab.json
2. $HOME/.config/gitlabci/.gitlab.json
3. $PWD/.gitlab.json

## Usage

### List pipelines in project
### Pipelines

#### List pipelines in project

```
$ gitlabci list group/project1
$ gitlabci pipeline list group/project1
group/project1 master 99811912 01 Dec 19 21:06 +0000 success
```

### List pipelines in project with jobs
#### List pipelines in project with jobs

```
$ gitlabci list -j group/project1
$ gitlabci pipeline list -j group/project1
group/project1 master 99811912 01 Dec 19 21:06 +0000 success
366026464 test black success 49.92 seconds
366026466 build build-stable-tag success 85.45 seconds
```

### Filter pipelines by status
#### Filter pipelines by status

```
$ gitlabci list -s running group/project1
$ gitlabci pipeline list -s running group/project1
group/project1 master 99811973 01 Dec 19 21:32 +0000 running
```

### List all pipelines of a group
#### List all pipelines of a group

```
$ gitlabci list -j -g group
$ gitlabci pipeline list -j -g group
group/project1 master 99811912 01 Dec 19 21:06 +0000 success
366026464 test black success 49.92 seconds
366026466 build build-stable-tag success 85.45 seconds
Expand All @@ -47,14 +61,14 @@ group/project3 master 99811991 01 Dec 19 21:37 +0000 success
366026502 build build-stable-tag success 69.12 seconds
```

### Watch pipelines
#### Watch pipelines

I don't like writing unnecessary code for command line applications
if there is a user friendly shell utility. To see running pipelines' progress,
you can use `watch`.

```
$ watch -n 10 gitlabci list -j -s running -g group
$ watch -n 10 gitlabci pipeline list -j -s running -g group
group/project1 master 99814035 01 Dec 19 21:33 +0000 running
366032711 test black running 39.52 seconds
366032712 build build-stable-tag created 0.00 seconds
Expand All @@ -63,8 +77,46 @@ group/project2 master 99814019 01 Dec 19 21:32 +0000 running
366032683 build build-stable-tag running 12.12 seconds
```

### Create pipeline
#### Create pipeline

```
$ gitlabci pipeline create group/project master
```

### Environment Variables

#### List variables

```
$ gitlabci env list egegunes/gitlabci
```

#### Dump variables

```
$ gitlabci env dump group/project1 > env.json
```

#### Load multiple variables

```
$ gitlabci env load group/project1 env.json
```

#### Add variable

```
$ gitlabci env add group/project1 GO_VERSION 1.12
```

#### Update variable

```
$ gitlabci env update group/project1 GO_VERSION 1.13
```

#### Delete variable

```
$ gitlabci create group/project master
$ gitlabci env delete group/project1 GO_VERSION
```

0 comments on commit 5faecc6

Please sign in to comment.