Skip to content

Commit 191c2bf

Browse files
author
Tim Bannister
committed
Pick example versions based on current release
1 parent 1421770 commit 191c2bf

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

content/en/docs/contribute/generate-ref-docs/contribute-upstream.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,13 @@ In the preceding section, you edited a file in the master branch and then ran sc
183183
to generate an OpenAPI spec and related files. Then you submitted your changes in a pull request
184184
to the master branch of the kubernetes/kubernetes repository. Now suppose you want to backport
185185
your change into a release branch. For example, suppose the master branch is being used to develop
186-
Kubernetes version 1.10, and you want to backport your change into the release-1.9 branch.
186+
Kubernetes version {{< skew latestVersion >}}, and you want to backport your change into the
187+
release-{{< skew prevMinorVersion >}} branch.
187188

188189
Recall that your pull request has two commits: one for editing `types.go`
189190
and one for the files generated by scripts. The next step is to propose a cherry pick of your first
190-
commit into the release-1.9 branch. The idea is to cherry pick the commit that edited `types.go`, but not
191-
the commit that has the results of running the scripts. For instructions, see
191+
commit into the release-{{< skew prevMinorVersion >}} branch. The idea is to cherry pick the commit
192+
that edited `types.go`, but not the commit that has the results of running the scripts. For instructions, see
192193
[Propose a Cherry Pick](https://git.k8s.io/community/contributors/devel/sig-release/cherry-picks.md).
193194

194195
{{< note >}}
@@ -197,8 +198,9 @@ pull request. If you don't have those permissions, you will need to work with so
197198
and milestone for you.
198199
{{< /note >}}
199200

200-
When you have a pull request in place for cherry picking your one commit into the release-1.9 branch,
201-
the next step is to run these scripts in the release-1.9 branch of your local environment.
201+
When you have a pull request in place for cherry picking your one commit into the
202+
release-{{< skew prevMinorVersion >}} branch, the next step is to run these scripts in the
203+
release-{{< skew prevMinorVersion >}} branch of your local environment.
202204

203205
```shell
204206
hack/update-generated-swagger-docs.sh
@@ -208,14 +210,15 @@ hack/update-api-reference-docs.sh
208210
```
209211

210212
Now add a commit to your cherry-pick pull request that has the recently generated OpenAPI spec
211-
and related files. Monitor your pull request until it gets merged into the release-1.9 branch.
213+
and related files. Monitor your pull request until it gets merged into the
214+
release-{{< skew prevMinorVersion >}} branch.
212215

213-
At this point, both the master branch and the release-1.9 branch have your updated `types.go`
216+
At this point, both the master branch and the release-{{< skew prevMinorVersion >}} branch have your updated `types.go`
214217
file and a set of generated files that reflect the change you made to `types.go`. Note that the
215-
generated OpenAPI spec and other generated files in the release-1.9 branch are not necessarily
216-
the same as the generated files in the master branch. The generated files in the release-1.9 branch
217-
contain API elements only from Kubernetes 1.9. The generated files in the master branch might contain
218-
API elements that are not in 1.9, but are under development for 1.10.
218+
generated OpenAPI spec and other generated files in the release-{{< skew prevMinorVersion >}} branch are not necessarily
219+
the same as the generated files in the master branch. The generated files in the release-{{< skew prevMinorVersion >}} branch
220+
contain API elements only from Kubernetes {{< skew prevMinorVersion >}}. The generated files in the master branch might contain
221+
API elements that are not in {{< skew prevMinorVersion >}}, but are under development for {{< skew latestVersion >}}.
219222

220223
## Generating the published reference docs
221224

content/en/docs/contribute/generate-ref-docs/kubectl.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ The remaining steps refer to your base directory as `<rdocs-base>`.
8686

8787
In your local k8s.io/kubernetes repository, check out the branch of interest,
8888
and make sure it is up to date. For example, if you want to generate docs for
89-
Kubernetes 1.17, you could use these commands:
89+
Kubernetes {{< skew prevMinorVersion >}}.0, you could use these commands:
9090

9191
```shell
9292
cd <k8s-base>
93-
git checkout v1.17.0
94-
git pull https://github.com/kubernetes/kubernetes v1.17.0
93+
git checkout v{{< skew prevMinorVersion >}}.0
94+
git pull https://github.com/kubernetes/kubernetes {{< skew prevMinorVersion >}}.0
9595
```
9696

9797
If you do not need to edit the `kubectl` source code, follow the instructions for
@@ -109,7 +109,7 @@ local kubernetes/kubernetes repository, and then submit a pull request to the ma
109109
is an example of a pull request that fixes a typo in the kubectl source code.
110110

111111
Monitor your pull request, and respond to reviewer comments. Continue to monitor your
112-
pull request until it is merged into the master branch of the kubernetes/kubernetes repository.
112+
pull request until it is merged into the target branch of the kubernetes/kubernetes repository.
113113

114114
## Cherry picking your change into a release branch
115115

@@ -118,9 +118,10 @@ Kubernetes release. If you want your change to appear in the docs for a Kubernet
118118
version that has already been released, you need to propose that your change be
119119
cherry picked into the release branch.
120120

121-
For example, suppose the master branch is being used to develop Kubernetes 1.10,
122-
and you want to backport your change to the release-1.15 branch. For instructions
123-
on how to do this, see
121+
For example, suppose the master branch is being used to develop Kubernetes
122+
{{< skew currentVersion >}}
123+
and you want to backport your change to the release-{{< skew prevMinorVersion >}} branch. For
124+
instructions on how to do this, see
124125
[Propose a Cherry Pick](https://git.k8s.io/community/contributors/devel/sig-release/cherry-picks.md).
125126

126127
Monitor your cherry-pick pull request until it is merged into the release branch.
@@ -138,14 +139,14 @@ Go to `<rdocs-base>`. On you command line, set the following environment variabl
138139
* Set `K8S_ROOT` to `<k8s-base>`.
139140
* Set `K8S_WEBROOT` to `<web-base>`.
140141
* Set `K8S_RELEASE` to the version of the docs you want to build.
141-
For example, if you want to build docs for Kubernetes 1.17, set `K8S_RELEASE` to 1.17.
142+
For example, if you want to build docs for Kubernetes {{< skew prevMinorVersion >}}, set `K8S_RELEASE` to {{< skew prevMinorVersion >}}.
142143

143144
For example:
144145

145146
```shell
146147
export K8S_WEBROOT=$GOPATH/src/github.com/<your-username>/website
147148
export K8S_ROOT=$GOPATH/src/k8s.io/kubernetes
148-
export K8S_RELEASE=1.17
149+
export K8S_RELEASE={{< skew prevMinorVersion >}}
149150
```
150151

151152
## Creating a versioned directory
@@ -165,13 +166,14 @@ make createversiondirs
165166

166167
In your local `<k8s-base>` repository, checkout the branch that has
167168
the version of Kubernetes that you want to document. For example, if you want
168-
to generate docs for Kubernetes 1.17, checkout the `v1.17.0` tag. Make sure
169+
to generate docs for Kubernetes {{< skew prevMinorVersion >}}.0, check out the
170+
`v{{< skew prevMinorVersion >}}` tag. Make sure
169171
you local branch is up to date.
170172

171173
```shell
172174
cd <k8s-base>
173-
git checkout v1.17.0
174-
git pull https://github.com/kubernetes/kubernetes v1.17.0
175+
git checkout v{{< skew prevMinorVersion >}}.0
176+
git pull https://github.com/kubernetes/kubernetes v{{< skew prevMinorVersion >}}.0
175177
```
176178

177179
## Running the doc generation code

0 commit comments

Comments
 (0)