Boilerplate tracks consumers via a YAML file committed to the boilerplate repository. Registered consumers ("subscribers") are able to take advantage of certain automations controlled by the subscriber utility.
subscribers.yaml keeps track of boilerplate consumers, the convention(s) to which they are subscribed, and the state of their subscription. To register your repository, simply add a stanza to this file, commit the change, and propose a pull request. The comment at the top of the file describes the schema and contents.
Subscribers can be managed in various ways using the subscriber
utility.
Some caveats:
- This is intended to be run only from within the boilerplate repository. (FIXME: Then we should put it someplace it doesn't get copied into consumer repositories.)
- The command lives at
./boilerplate/_lib/subscriber
. You may wish to alias or$PATH
this. But note: - It (probably) only works if your PWD is the root of the boilerplate repository. (FIXME?)
- Certain subcommands rely on the
gh
command being installed and properly configured. - It relies on
yq
version 4.x.
Subcommands follow:
Subcommands of subscriber propose
deal with proposing PRs to subscribers' repositories.
It has no functionality of its own.
Automatically propose a boilerplate update PR to one or more subscribers' repositories.
Run subscriber propose update -h
for details.
Subcommands of subscriber report
probe the state of subscribers in various ways.
All of these subcommands are intended to be read-only -- i.e. they won't make any changes.
subscriber report
has no functionality of its own.
Produces a report listing all "onboarded" subscribers (those whose entry in subscribers.yaml contains at least one convention with manual
(FIXME: or automated
) status).
Run subscriber report onboarding -h
for details on the output format.
Produces a report listing all registered subscribers (those with any entry in subscribers.yaml).
Each is shown with zero or more lines describing open boilerplate-related pull requests (those whose branch name starts with boilerplate-
) in the subscriber's repository.
Run subscriber report pr -h
for details on the output format.
For each "onboarded" subscriber (whose entry in subscribers.yaml contains at least one convention with manual
(FIXME: or automated
) status), inspects its prow configuration in openshift/release.
- If the configuration is as expected, reports "A-OK"
- If the configuration is missing, reports "No configuration".
- If the configuration is present, but different from what we expect, prints the diff.
Run subscriber report release -h
for more.