Skip to content

Commit 79d71f2

Browse files
authored
Merge pull request #3709 from xmudrii/revisit-docs
Revisit monorepo and release docs
2 parents 2e1131e + 64650c7 commit 79d71f2

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

docs/content/contributing/guides/publishing-a-new-kcp-release.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ description: >
2626

2727
1. `git fetch` from the main kcp repository (kcp-dev/kcp) to ensure you have the latest commits
2828
2. Tag the main module
29-
1. If your git remote for kcp-dev/kcp is named something other than `upstream`, change `REF` accordingly
30-
2. If you are creating a release from a release branch, change `main` in `REF` accordingly, or you can
31-
make `REF` a commit hash.
32-
33-
```shell
34-
REF=upstream/main
35-
TAG=v1.2.3
36-
git tag --sign --message "$TAG" "$TAG" "$REF"
37-
```
29+
1. If your git remote for kcp-dev/kcp is named something other than `upstream`, change `REF` accordingly
30+
2. If you are creating a release from a release branch, change `main` in `REF` accordingly, or you can
31+
make `REF` a commit hash.
32+
33+
```shell
34+
REF=upstream/main
35+
TAG=<tag> # e.g. v1.2.3
36+
git tag --sign --message "$TAG" "$TAG" "$REF"
37+
```
3838

3939
### Push the Tag
4040

4141
```shell
4242
REMOTE=upstream
43-
TAG=v1.2.3
43+
TAG=<tag> # e.g. v1.2.3
4444
git push "$REMOTE" "$TAG"
4545
```
4646

@@ -58,7 +58,7 @@ Set `REMOTE`, `REF`, and `VERSION` as appropriate.
5858
```shell
5959
REMOTE=upstream
6060
REF="$REMOTE/main"
61-
VERSION=1.2
61+
VERSION=<version> # e.g. 1.2
6262
git checkout -b "release-$VERSION" "$REF"
6363
git push "$REMOTE" "release-$VERSION"
6464
```
@@ -126,7 +126,7 @@ The [goreleaser](https://github.com/kcp-dev/kcp/actions/workflows/goreleaser.yml
126126
Documentation for the respective release branch needs to be triggered manually after the release branch has been pushed.
127127
128128
1. Navigate to the [Generate and push docs](https://github.com/kcp-dev/kcp/actions/workflows/docs-gen-and-push.yaml) GitHub Action.
129-
2. Hit the "Run forkflow" button, run workflow against `release-$VERSION`.
129+
2. Hit the "Run workflow" button, run workflow against `release-$VERSION`.
130130
3. Make sure the triggered workflow ran and deployed a new version of the documentation to [docs.kcp.io](https://docs.kcp.io).
131131
132132
## Notify

docs/content/contributing/monorepo.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ The [kcp-dev/kcp](https://github.com/kcp-dev/kcp) repository is a monorepo that
1313
At the moment, the following libraries are part of the monorepo:
1414

1515
- [kcp-dev/apimachinery](https://github.com/kcp-dev/apimachinery)
16+
- [kcp-dev/cli](https://github.com/kcp-dev/cli)
1617
- [kcp-dev/client-go](https://github.com/kcp-dev/client-go)
1718
- [kcp-dev/code-generator](https://github.com/kcp-dev/code-generator)
19+
- [kcp-dev/sdk](https://github.com/kcp-dev/sdk)
1820

1921
## Terminology
2022

@@ -36,7 +38,8 @@ within published repositories (this is explained later in this document).
3638
The source code for staging repositories is located on the special path in the monorepo which is
3739
[`./staging/src/github.com/kcp-dev`](https://github.com/kcp-dev/kcp/tree/main/staging/src/github.com/kcp-dev).
3840
Every subdirectory on that path corresponds to a single staging repository.
39-
The code in the staging/ directory is authoritative, i.e. the only copy of the code. You can directly modify such code.
41+
The code in the `staging/` directory is authoritative, i.e. the only copy of the code. You can directly modify such
42+
code.
4043

4144
In order to preserve standalone Go modules for each staging repository, the source code from staging repositories
4245
is mirrored to standalone (aka published) repositories. The mirroring is an automatic process happening every
@@ -57,7 +60,7 @@ version v2 will be v2.29.0.
5760

5861
Concretely:
5962

60-
- kcp-dev/client-go has the Go module major version at v0, so tags will be v0.x.y
63+
- kcp-dev/cli, kcp-dev/client-go, and kcp-dev/sdk have the Go module major version at v0, so tags will be v0.x.y
6164
- kcp-dev/apimachinery has the Go module major version at v2, so tags will be v2.x.y
6265
- kcp-dev/code-generator has the Go module major version at v3, so tags will be v3.x.y
6366

@@ -73,6 +76,7 @@ include:
7376

7477
- Add support for running publishing-bot on ARM64
7578
- Add image building process compatible with kcp
79+
- Add support for non-v0 and non-v1 Go modules
7680
- Add support for customizing tags mirroring
7781
- Add kcp-related configuration
7882

@@ -87,6 +91,11 @@ The kcp configuration for publishing-bot can be found at https://github.com/kcp-
8791

8892
The mirroring rules are located in the kcp-dev/kcp repoitory and can be found at https://github.com/kcp-dev/kcp/blob/main/staging/publishing/rules.yaml
8993

94+
The kcp project also has a testing envrionment for publishing-bot called `kcp-nightly`. There's a dedicated [GitHub
95+
organization](https://github.com/kcp-nightly) and a dedicated instance of publishing-bot running in the
96+
`publishing-bot-nightly` namespace in the Prow control plane cluster. The publishing-bot configuration for the
97+
`kcp-nightly` environemnt can be found at https://github.com/kcp-dev/publishing-bot/blob/master/configs/kcp-nightly
98+
9099
At the moment, the bot is configured to run every 4 hours.
91100

92101
## Creating a New Staging Repository
@@ -99,9 +108,11 @@ Adding a completely new staging repository to the monorepo must follow this proc
99108
[kcp-dev/kcp](https://github.com/kcp-dev/kcp) repository
100109
- Create a staging repository in `staging/src/github.com/kcp-dev` with all required files for a repository
101110
(e.g. LICENSE, OWNERS...)
102-
- Create a new Git repository on GitHub to serve as a published repository with an empty initial commit
111+
- Create a new Git repository on GitHub to serve as a published repository with an **empty** initial commit
103112
- Update the publishing-bot rules to mirror from the new staging repository to the new published repository
104113

105114
Adding an existing standalone repository to the monorepo is generally discouraged and will be considered on
106-
a case-by-case basis by Maintainers. This case requires following different steps that will be documented
107-
in the future.
115+
a case-by-case basis by Maintainers. This case requires following different steps that are documented as part of the
116+
monorepo proposal: https://github.com/kcp-dev/enhancements/pull/7
117+
118+
<!-- TODO(xmudrii): replace the PR link with a link to the document once merged -->

0 commit comments

Comments
 (0)