Skip to content

Commit b5949f0

Browse files
committed
Add docs for gcs creds
1 parent f1d6c0b commit b5949f0

File tree

2 files changed

+64
-27
lines changed

2 files changed

+64
-27
lines changed

docs/cli_usage_guide.md

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Options:
7373
code if a test failure is found.
7474
--jira-config-path PATH The path to the jira configuration file
7575
--firewatch-config-path PATH The path to the firewatch configuration file
76+
--gcs-creds-file PATH The path to the GCS credentials file
7677
--gcs-bucket TEXT The name of the GCS bucket that holds
7778
OpenShift CI logs
7879
--pr-id TEXT The pull request number that the rehearsal

docs/configuration_guide.md

+63-27
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
# Configuring Firewatch
1+
# Configuring Firewatch<!-- omit in toc -->
22

3-
## Table of Contents
3+
## Table of Contents<!-- omit in toc -->
44

55
- [Jira Issue Creation Configuration](#jira-issue-creation-configuration)
6-
- [Getting Started](#getting-started)
7-
- [Usage in OpenShift CI](#usage-in-openshift-ci)
8-
- [Rule Configuration Value Definitions](#rule-configuration-value-definitions)
9-
- [`jira_project`](#jiraproject)
10-
- [`step`](#step)
11-
- [`failure_type`](#failuretype)
12-
- [`classification`](#classification)
13-
- [`jira_epic`](#jiraepic)
14-
- [`jira_component`](#jiracomponent)
15-
- [`jira_affects_version`](#jiraaffectsversion)
16-
- [`jira_additional_labels`](#jiraadditionallabels)
17-
- [`jira_assignee`](#jiraassignee)
18-
- [`jira_priority`](#jirapriority)
19-
- [`jira_security_level`](#jirasecuritylevel)
20-
- [`ignore`](#ignore)
21-
- [`group`](#group)
6+
- [`failure_rules`](#failure_rules)
7+
- [`success_rules` (OPTIONAL)](#success_rules-optional)
8+
- [Rule Configuration Value Definitions](#rule-configuration-value-definitions)
9+
- [`jira_project`](#jira_project)
10+
- [`step`](#step)
11+
- [`failure_type`](#failure_type)
12+
- [`classification`](#classification)
13+
- [`jira_epic`](#jira_epic)
14+
- [`jira_component`](#jira_component)
15+
- [`jira_affects_version`](#jira_affects_version)
16+
- [`jira_additional_labels`](#jira_additional_labels)
17+
- [`jira_assignee`](#jira_assignee)
18+
- [`jira_priority`](#jira_priority)
19+
- [`jira_security_level`](#jira_security_level)
20+
- [`ignore`](#ignore)
21+
- [`group`](#group)
22+
- [Using a base config file](#using-a-base-config-file)
23+
- [Configuring Use With Private GCS Bucket](#configuring-use-with-private-gcs-bucket)
24+
2225

2326
## Jira Issue Creation Configuration
2427

@@ -64,15 +67,25 @@ The firewatch configuration is a list of rules, each rule is defined using the f
6467

6568
**Optional Values**:
6669

67-
- [`jira_epic`](#jiraepic)
68-
- [`jira_component`](#jiracomponent)
69-
- [`jira_affects_version`](#jiraaffectsversion)
70-
- [`jira_additional_labels`](#jiraadditionallabels)
71-
- [`jira_assignee`](#jiraassignee)
72-
- [`jira_priority`](#jirapriority)
73-
- [`jira_security_level`](#jirasecuritylevel)
74-
- [`ignore`](#ignore)
75-
- [`group`](#group)
70+
- [Jira Issue Creation Configuration](#jira-issue-creation-configuration)
71+
- [`failure_rules`](#failure_rules)
72+
- [`success_rules` (OPTIONAL)](#success_rules-optional)
73+
- [Rule Configuration Value Definitions](#rule-configuration-value-definitions)
74+
- [`jira_project`](#jira_project)
75+
- [`step`](#step)
76+
- [`failure_type`](#failure_type)
77+
- [`classification`](#classification)
78+
- [`jira_epic`](#jira_epic)
79+
- [`jira_component`](#jira_component)
80+
- [`jira_affects_version`](#jira_affects_version)
81+
- [`jira_additional_labels`](#jira_additional_labels)
82+
- [`jira_assignee`](#jira_assignee)
83+
- [`jira_priority`](#jira_priority)
84+
- [`jira_security_level`](#jira_security_level)
85+
- [`ignore`](#ignore)
86+
- [`group`](#group)
87+
- [Using a base config file](#using-a-base-config-file)
88+
- [Configuring Use With Private GCS Bucket](#configuring-use-with-private-gcs-bucket)
7689

7790
### `success_rules` (OPTIONAL)
7891

@@ -358,3 +371,26 @@ By setting the env var, the user may override the base config with:
358371
- The base file configures a rule for the step `exact-step-name`
359372
- A specific scenario requires to apply this rule on a set of similar steps
360373
- In this case, we will extend it and use `*-step-*` to override the step name by a pattern
374+
375+
## Configuring Use With Private GCS Bucket
376+
377+
Firewatch allows for the use of a private GCS bucket if needed. In order to use this, you will need to receive [service account credentials](https://developers.google.com/workspace/guides/create-credentials) from an administator of the GCS bucket. The credentials should be in JSON format. Example:
378+
379+
```json
380+
{
381+
"type": "service_account",
382+
"project_id": "some-project",
383+
"private_key_id": "0000000000000000000000000",
384+
"private_key": "-----BEGIN PRIVATE KEY-----\nABCDEFG\n-----END PRIVATE KEY-----\n",
385+
"client_email": "email@example.com",
386+
"client_id": "12345678",
387+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
388+
"token_uri": "https://oauth2.googleapis.com/token",
389+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
390+
"client_x509_cert_url": "<Cert URL>",
391+
"universe_domain": "googleapis.com"
392+
}
393+
394+
```
395+
396+
You will need to provide the name of the bucket and the path to the service account credentials in the [CLI](./cli_usage_guide.md#report). Exmaple: `firewatch report --gcs-bucket "my-bucket-name" --gcs-creds-file ./some/creds/file.json`

0 commit comments

Comments
 (0)