Skip to content

Commit f3d1001

Browse files
author
Bastien Abadie
committed
Document repo onboarding through secrets
1 parent cd5739f commit f3d1001

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

docs/configuration.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ common:
6161
# try_name is a display name for that repository
6262
try_name: try
6363

64-
# try_mode describes how the try_task_config is published
65-
# - json, to build a json v2 try_task_config.json
66-
# - syntax, to add a commit with a try syntax as commit message
67-
try_mode: json
68-
69-
# try_syntax is the full commit message used when try_mode = syntax
70-
try_syntax: -p xxx -l code-review
71-
7264
# Mercurial checkout mode, several modes available:
7365
# - robust, to use robustcheckout extension (recommended)
7466
# - batch, to clone from revision 1 up to tip (slow but lower memory usage)
@@ -79,12 +71,22 @@ common:
7971
# is setup from a decision task (more details on the bot documentation)
8072
decision_env_prefix: GECKO
8173

74+
# Name of the environment variable used by the bot to detect which revision is the head
75+
decision_env_revision: GECKO_HEAD_REV
76+
77+
# Name of the environment variable used by the bot to detect which repository is in use
78+
decision_env_repository: GECKO_HEAD_REPOSITORY
79+
8280
# The ssh username (or email) used to push on Try
8381
ssh_user: someone@mozilla.com
8482

8583
# (Optional) private ssh-key overriding the default one setup in the events main section
8684
ssh_key: xxxx
8785

86+
# (Optional) Force the application of the patches on top of the repository tip
87+
# instead of the base revision specified by Phabricator
88+
use_latest_revision: true
89+
8890
# This main section is only used by the bot project
8991
bot:
9092
# The list of reporter classes used to publish issues

docs/new_repository.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,35 @@
99
## Contact us
1010

1111
As each new repository has different needs and constraints, please reach out to our team. Look in [README](../README.md) for contact information.
12+
13+
## Onboarding a new repository
14+
15+
⚠️ This section is for code-review bot administrators who wish to add a new repository into the system.
16+
17+
There are 2 places where configuration must be updated: Runtime configuration in Taskcluster, and the backend database.
18+
19+
### Runtime configuration in Taskcluster
20+
21+
You'll need to edit either the [testing](https://firefox-ci-tc.services.mozilla.com/secrets/project%2Frelman%2Fcode-review%2Fruntime-testing) or [production](https://firefox-ci-tc.services.mozilla.com/secrets/project%2Frelman%2Fcode-review%2Fruntime-production) secret that holds the runtime configuration for the bot.
22+
23+
The section to edit in the YAML content is `common.repositories`, which is a list of known repositories.
24+
25+
Each repository has the following structure:
26+
27+
```yaml
28+
repositories:
29+
- checkout: robust
30+
try_url: ssh://hg.mozilla.org/try
31+
name: mozilla-central
32+
ssh_user: reviewbot
33+
url: https://hg.mozilla.org/mozilla-unified
34+
decision_env_revision: GECKO_HEAD_REV
35+
decision_env_repository: GECKO_HEAD_REPOSITORY
36+
decision_env_prefix: GECKO
37+
```
38+
39+
The configuration [is explained in this documentation](./configuration.md) in details.
40+
41+
### Backend database
42+
43+
TODO

docs/projects/bot.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ common:
198198
repositories:
199199
- checkout: robust
200200
try_url: 'ssh://hg.mozilla.org/try'
201-
try_mode: json
202201
try_name: try
203202
name: mozilla-central
204203
ssh_user: <ssh_user>

0 commit comments

Comments
 (0)