|
7 | 7 |
|
8 | 8 | 
|
9 | 9 |
|
10 |
| -A commandline interface for Jenkins. |
| 10 | +A commandline interface for Jenkins. |
11 | 11 |
|
12 |
| -### Features |
| 12 | +## Features |
13 | 13 |
|
14 | 14 | * Queries the current status of jobs in parallel.
|
15 | 15 | * Can trigger Jenkins builds from the commandline.
|
16 | 16 | * Visualizes the status of jobs and nodes.
|
17 | 17 | * Can diff the output two runs.
|
18 | 18 |
|
19 |
| -### |
20 |
| - |
21 |
| -``` |
| 19 | +```Shell |
22 | 20 | usage: riffraff [<flags>] <command> [<args> ...]
|
23 | 21 |
|
24 | 22 | Flags:
|
@@ -52,46 +50,52 @@ Commands:
|
52 | 50 | Open a job in the browser
|
53 | 51 | ```
|
54 | 52 |
|
55 |
| -### Installation |
| 53 | +## Installation |
56 | 54 |
|
57 |
| -``` |
| 55 | +```Shell |
58 | 56 | go get github.com/mre/riffraff
|
59 | 57 | ```
|
60 | 58 |
|
61 | 59 | ...or download a static binary from the [releases page](https://github.com/mre/riffraff/releases).
|
62 | 60 |
|
63 |
| -### Getting started |
| 61 | +## Getting started |
64 | 62 |
|
65 | 63 | You need to set the following environment variables:
|
66 | 64 |
|
67 |
| -``` |
| 65 | +```Shell |
68 | 66 | export JENKINS_URL="http://example.com/"
|
69 | 67 | export JENKINS_USER="username"
|
70 | 68 | export JENKINS_PW="password"
|
71 | 69 | ```
|
72 | 70 |
|
73 | 71 | You might want to put those into your `~/.bashrc`, `~/.zshrc` or equivalent.
|
74 | 72 |
|
| 73 | +## Usage |
75 | 74 |
|
76 |
| -### Usage |
77 |
| - |
78 |
| -``` |
| 75 | +```Shell |
79 | 76 | riffraff status jenkins-job-name
|
80 | 77 | ```
|
81 | 78 |
|
82 | 79 | This will print the current status of all Jenkins jobs matching the given pattern (`jenkins-job-name` in this case).
|
83 | 80 | You can use any regular expression for that, e.g.:
|
84 | 81 |
|
85 |
| -``` |
| 82 | +```Shell |
86 | 83 | riffraff status "^application-.*-unittests$"
|
87 | 84 | ```
|
88 | 85 |
|
89 |
| -You can get the full output of each last job matching the pattern with |
| 86 | +You can get the full output of each last job matching the pattern with |
90 | 87 |
|
91 |
| -``` |
| 88 | +```Shell |
92 | 89 | riffraff status -v "^application-.*-unittests$"
|
93 | 90 | ```
|
94 | 91 |
|
95 |
| -### OBTW |
| 92 | +## Development |
| 93 | + |
| 94 | +* Install golang version 1.11 or later for [go modules](https://github.com/golang/go/wiki/Modules) support |
| 95 | +* Clone this repository to a directory in your `$GOPATH/src` tree (recommended) or use`go get -u github.com/mre/riffraff.git` (uses https not SSH) |
| 96 | +* In the source folder run `go run main.go` to install modules and run `riffraff` |
| 97 | +* If you don't have a Jenkins server you can run it by using its [`.war` file](https://jenkins.io/doc/pipeline/tour/getting-started/) (recommended) or installing its [`.deb` file](https://jenkins.io/doc/book/installing) |
| 98 | + |
| 99 | +## OBTW |
96 | 100 |
|
97 | 101 | The tool is named after the [butler from the Rocky Horror Picture Show](https://en.wikipedia.org/wiki/The_Rocky_Horror_Picture_Show:_Let%27s_Do_the_Time_Warp_Again), and not the rapper with the same name ;-).
|
0 commit comments