Skip to content

Commit 41e7a64

Browse files
authored
Merge pull request #954 from rust-lang/tshepang-patch-3
only rust-lang/rust uses bors now
2 parents 94c93c2 + 281f975 commit 41e7a64

File tree

1 file changed

+1
-68
lines changed

1 file changed

+1
-68
lines changed

src/infra/docs/bors.md

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bors
22

33
The infrastructure team manages an instance of [Homu] called "Bors", to be used
4-
by repositories inside the `rust-lang` organization. The instance is available
4+
for `rust-lang/rust`. The instance is available
55
at [bors.rust-lang.org], and is backed by the [@bors] GitHub account.
66

77
The service is configured [with Terraform][tf], and it's automatically deployed
@@ -17,76 +17,9 @@ actual state in the repositories.
1717
See [Fixing inconsistencies in the bors queue](./bors/queue-resync.md) for
1818
instructions on how to do this properly.
1919

20-
### Adding a new repository to bors
21-
22-
There are multiple steps needed to add a repository to our Bors instance:
23-
24-
1. The [@bors] GitHub account needs to be granted write access to the
25-
repository.
26-
27-
2. Each CI provider needs to have a single GitHub Check Run to gate on. This is
28-
not provided by default on GitHub Actions, but it can be simulated with
29-
these two jobs, which will generate a `bors build finished` check:
30-
31-
```yaml
32-
end-success:
33-
name: bors build finished
34-
if: success()
35-
runs-on: ubuntu-latest
36-
needs: [ALL, OTHER, JOBS]
37-
steps:
38-
- name: Mark the job as successful
39-
run: exit 0
40-
41-
end-failure:
42-
name: bors build finished
43-
if: "!success()"
44-
runs-on: ubuntu-latest
45-
needs: [ALL, OTHER, JOBS]
46-
steps:
47-
- name: Mark the job as a failure
48-
run: exit 1
49-
```
50-
51-
Make sure to replace `[ALL, OTHER, JOBS]` with a list of all the jobs you
52-
want to gate on.
53-
54-
These jobs need to run on specific branches (`auto` and `try`) so it's necessary
55-
to add those branches to the list of branches tested by the CI provider. For GitHub
56-
Actions that looks like this:
57-
58-
```yaml
59-
on:
60-
push:
61-
branches: [
62-
auto, # Added for bors
63-
try # Added for bors
64-
]
65-
```
66-
67-
3. Add the repository name to the bors permissions array in the [team
68-
repository][team-permissions.rs], and grant the `bors.REPOSITORY.review`
69-
permission to the right teams or people. You can see an example of adding
70-
bors permissions to a team [here][bors-permission].
71-
72-
4. Add the repository to the `repositories` map in [the Terraform configuration
73-
file][tf-repos]. This will create a webhook and inject its secret key in the
74-
bors execution environment.
75-
76-
5. Add the repository to the [Bors configuration][bors-config], taking
77-
inspiration from other repositories. Note that the environment variables used
78-
in that config will be set automatically as long as you completed step 3 above.
79-
80-
6. Give it a test by commenting `@bors ping` in any PR. If you get a response back,
81-
you can then try to approve the PR with `@bors r+`.
82-
8320
[@bors]: https://github.com/bors
8421
[Homu]: https://github.com/rust-lang/homu
85-
[bors-config]: https://github.com/rust-lang/homu/blob/master/cfg.production.toml
8622
[bors.rust-lang.org]: https://bors.rust-lang.org
8723
[ecs]: ./ecs-services.md
8824
[rust-lang/homu]: https://github.com/rust-lang/homu
89-
[team-permissions.rs]: https://github.com/rust-lang/team/blob/52b4370214e1c8eabe483f3a26f22733d94b326f/config.toml#L18-L37
90-
[bors-permission]: https://github.com/rust-lang/team/blob/a1532ec2b08c9d40c0a2c7643ffe72de9671e265/teams/wg-compiler-performance.toml#L25-L26
91-
[tf-repos]: https://github.com/rust-lang/simpleinfra/blob/master/terraform/bors/_config.auto.tfvars
9225
[tf]: https://github.com/rust-lang/simpleinfra/tree/master/terraform/bors/

0 commit comments

Comments
 (0)