Skip to content

Commit b600113

Browse files
author
jake klein
committed
Improve readme
1 parent 5a885f2 commit b600113

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

README.md

+20-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# concourse-flake-detector
22

3-
A tool to find flakey jobs in a Concourse pipeline. Flakey in this context is when a build fails when it has otherwise passed with the same set of inputs. This is currently restricted to only checking changes to git input.
3+
A tool to find flakey jobs in a Concourse pipeline. Flakey in this context is when a build fails when it has otherwise passed with the same set of inputs. This is currently restricted to only checking changes to git resources.
44

55
In order to build the flake-detect checkout the repo and run `cd cmd/flake-detector && go build .`
66
## Usage
@@ -13,36 +13,33 @@ In order to build the flake-detect checkout the repo and run `cd cmd/flake-detec
1313

1414
`-count <number of builds to scan>` Optional- Only scan the last x amount of builds. Currently max's and defaults at 100.
1515

16-
`-bearer <bearer authentication token>` Optional- Needed if your pipeline is not public. To obtain a bearer token go to `<ci-url>/api/v1/teams/<team>/auth/token`or run the `flake-detector` without the flag configured and it will prompt you with the URL to go to to obtained a token.
16+
`-bearer <bearer authentication token>` Optional- Needed if your pipeline is not public. To obtain a bearer token go to `<ci-url>/api/v1/teams/<team>/auth/token`or run the `flake-detector` without the flag configured and it will prompt you with the URL to go to obtain a token.
1717

1818
`-debug <boolean>` Optional- Configure true if you want debug information about what endpoints are being hit.
1919

2020

2121

22-
`./flake-detector -pipeline <pipeline-name> -url <ci-url>`. If your pipeline is configured under a team add the `-team <my-team-name>` flag.
23-
24-
2522
##### Examples
2623

2724
`./flake-detector -team main -pipeline main -url https://ci.concourse.ci`
2825

2926
```
30-
+------------------------+--------+-------+
31-
| NAME | BUILDS | FLAKE |
32-
+------------------------+--------+-------+
33-
| fly | 74 | 0 |
34-
| atc | 74 | 9 |
35-
| baggageclaim | 74 | 0 |
36-
| blackbox | 74 | 2 |
37-
| bosh-testflight | 74 | 1 |
38-
| bin-testflight | 74 | 0 |
39-
| bosh-deploy | 74 | 2 |
40-
| bin-smoke | 74 | 1 |
41-
| bin-docker | 74 | 1 |
42-
| shipit | 8 | 0 |
43-
| virtualbox-box | 13 | 2 |
44-
| virtualbox-testflight | 11 | 1 |
45-
| release-virtualbox-box | 7 | 2 |
46-
| topgun | 74 | 7 |
47-
+------------------------+--------+-------+
27+
+------------------------+--------+--------+
28+
| NAME | BUILDS | FLAKES |
29+
+------------------------+--------+--------+
30+
| fly | 74 | 0 |
31+
| atc | 74 | 9 |
32+
| baggageclaim | 74 | 0 |
33+
| blackbox | 74 | 2 |
34+
| bosh-testflight | 74 | 1 |
35+
| bin-testflight | 74 | 0 |
36+
| bosh-deploy | 74 | 2 |
37+
| bin-smoke | 74 | 1 |
38+
| bin-docker | 74 | 1 |
39+
| shipit | 8 | 0 |
40+
| virtualbox-box | 13 | 2 |
41+
| virtualbox-testflight | 11 | 1 |
42+
| release-virtualbox-box | 7 | 2 |
43+
| topgun | 74 | 7 |
44+
+------------------------+--------+--------+
4845
```

cmd/flake-detector/flake-detector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func main() {
107107

108108
fmt.Println(results)
109109
table := tablewriter.NewWriter(os.Stdout)
110-
table.SetHeader([]string{"Name", "builds", "flake"})
110+
table.SetHeader([]string{"Name", "builds", "flakes"})
111111

112112
for _, v := range results {
113113
table.Append(v)

integration_tests/flake-detector_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var _ = Describe("flake-detector", func() {
6161
_, logBuffer := runFlakeDetector(0, params...)
6262

6363
Expect(logBuffer).To(gbytes.Say("Pipeline: %s", pipelineName))
64-
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 0 |", jobName))
64+
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 0 |", jobName))
6565

6666
})
6767
})
@@ -99,7 +99,7 @@ var _ = Describe("flake-detector", func() {
9999
_, logBuffer := runFlakeDetector(0, params...)
100100

101101
Expect(logBuffer).To(gbytes.Say("Pipeline: %s", pipelineName))
102-
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 1 |", jobName))
102+
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 1 |", jobName))
103103

104104
})
105105

@@ -141,7 +141,7 @@ var _ = Describe("flake-detector", func() {
141141
_, logBuffer := runFlakeDetector(0, params...)
142142

143143
Expect(logBuffer).To(gbytes.Say("Pipeline: %s", pipelineName))
144-
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 0 |", jobName))
144+
Expect(string(logBuffer.Contents())).To(ContainSubstring("%s | 2 | 0 |", jobName))
145145

146146
})
147147
})

0 commit comments

Comments
 (0)