From 5faecc6accbefb9cf8324baedda94fa3091a0ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Sun, 15 Dec 2019 21:30:37 +0300 Subject: [PATCH] Update README --- README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 729146e..c6e0f58 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 ```