Skip to content

Commit 52d7284

Browse files
committed
Update readme
1 parent 01cd6d2 commit 52d7284

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tools/flakeguard/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,41 @@ Flakeguard offers two main commands:
2424

2525
- `find` identifies test packages affected by recent changes.
2626
- `run` executes tests multiple times to identify flaky tests
27+
- `create-tickets` automates the creation of Jira tickets for flaky tests detected by Flakeguard
2728

2829
Run with `--help` to see all flags for the commands.
2930

3031
### JSON Output
3132

3233
Both `find` and `run` commands support JSON output `--json`, making it easy to integrate Flakeguard with CI/CD pipelines and reporting tools.
3334

35+
### Creating JIRA Tickets
36+
The `create-tickets` command allows you to automate the creation of JIRA tickets for flaky tests. It reads test results from a CSV file (typically exported from a Splunk view) and creates tickets in JIRA.
37+
38+
```
39+
go run main.go create-tickets --jira-project=<JIRA_PROJECT_KEY> --flaky-test-json-db-path=<PATH_TO_FLAKY_TEST_DB_JSON> --assignee-mapping=<PATH_TO_JIRA_ASSIGNEE_MAPPING_JSON> --csv-path=<PATH_TO_CSV_FILE> [--skip-existing] [--dry-run]
40+
```
41+
42+
Example:
43+
```
44+
go run main.go create-tickets --jira-project=DX --flaky-test-json-db-path=.flaky_test_db.json --assignee-mapping=.jira_assignee_mapping.json --skip-existing --csv-path '1742825894_77903.csv'
45+
```
46+
47+
**Options:**
48+
49+
- `--jira-project`: The JIRA project key where tickets should be created (e.g., `DX`).
50+
- `--flaky-test-json-db-path`: The path to a JSON database (`.json`) that stores information about existing flaky test tickets.
51+
- `--assignee-mapping`: The path to a JSON file (`.json`) that maps test packages to JIRA assignees.
52+
- `--csv-path`: The path to the CSV file containing the flaky test results.
53+
- `--skip-existing`: (Optional) Skips creating tickets for tests that already have corresponding JIRA tickets in the database or JIRA.
54+
- `--dry-run`: (Optional) Performs a dry run without actually creating JIRA tickets.
55+
56+
**Environment Variables:**
57+
58+
- `JIRA_DOMAIN`: The domain of your JIRA instance.
59+
- `JIRA_EMAIL`: The email address used to authenticate with JIRA.
60+
- `JIRA_API_KEY`: The API key used to authenticate with JIRA.
61+
3462
### Example Run
3563

3664
You can find example usage and see outputs with:

0 commit comments

Comments
 (0)