Skip to content

Commit 59fe178

Browse files
jskeetldetmerparthea
authored
docs: updates to the library maintainer guide (#2630)
- Add a link to the internal support page - Explain about configuring Docker to use gcloud for auth - Explain how to enable automatic releases (and the ramifications) --------- Signed-off-by: Jon Skeet <[email protected]> Co-authored-by: ldetmer <[email protected]> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 2c94a53 commit 59fe178

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

doc/library-maintainer-guide.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ for a more comprehensive list of commands and flags.
1212
This guide uses the term Librarian (capital L, regular font) for the overall
1313
Librarian system, and `librarian` (lower case L, code font) for the CLI.
1414

15+
## Internal support (Googlers)
16+
17+
If anything in this guide is unclear, please see go/g3doc-cloud-sdk-librarian-support
18+
for appropriate ways of obtaining more support.
19+
1520
## Prerequisites
1621

1722
`librarian` requires:
@@ -38,6 +43,13 @@ follow the sudoless part.
3843
> actually go away any time soon. We may investigate using podman instead if
3944
> necessary.
4045
46+
Docker needs to be configured to use gcloud for authentication. The following
47+
command line needs to be run, just once:
48+
49+
```sh
50+
gcloud auth configure-docker us-central1-docker.pkg.dev
51+
```
52+
4153
## Running `librarian`
4254

4355
There are various options for running `librarian`. We recommend using `go run`
@@ -239,3 +251,45 @@ $ cd ../google-cloud-go
239251
$ git checkout -b test-generated-api-changes
240252
$ librarian generate -api-source=../googleapis -library=bigtable
241253
```
254+
255+
## Using automated releases
256+
257+
Maintainers *may* configure Librarian for automated releases, but should do so
258+
with a significant amount of care. Using automated releases is convenient, but
259+
cedes control - and once a release has been published, it can't generally be
260+
rolled back in anything like a "clean" way.
261+
262+
### Impact of automated releases
263+
264+
When automated releases are enabled, they will be initiated on a regular
265+
[cadence](https://goto.google.com/g3doc-librarian-automation), in release PRs that contain other libraries needing releasing from
266+
the same repository. These pull requests will be approved and merged by the
267+
Cloud SDK Platform team.
268+
269+
The version number and release notes will be automatically determined by
270+
Librarian from conventional commits. These will *not* be vetted by the
271+
Cloud SDK Platform team before merging.
272+
273+
Using automated releases doesn't *prevent* manual releases - a maintainer team
274+
can always use the process above to create and merge release PRs themselves,
275+
customizing the version number and release notes as they see fit. Creating
276+
a single manual release does not interrupt automated releases - any subsequent
277+
"release-worthy" changes will still cause an automated release to be created.
278+
279+
### Enabling automated releases
280+
281+
If the repository containing the library is not already using automated releases
282+
for other libraries (i.e. if it's a split repo instead of a monorepo),
283+
first [open a ticket](https://buganizer.corp.google.com/issues/new?component=1198207&template=2190445) with the Cloud Platform SDK team to enable automated releases.
284+
285+
Next, edit the `.librarian/config.yaml` file in your repository. You will
286+
see YAML describing additional configuration for the libraries in the
287+
repository, particularly those which have release automation blocked. Find
288+
the library for which you wish to enable release automation, and remove or
289+
comment out the `release_blocked` key. We recommend commenting out rather
290+
than deleting, ideally adding an explanation and potentially caveats, for
291+
future readers.
292+
293+
Create a PR with the configuration change, get it reviewed and merged, and
294+
the next time release automation runs against the repository, it will consider
295+
the library eligible for automatic releases.

0 commit comments

Comments
 (0)