changes for release v1.1.1 (#8125)

This commit is contained in:
Long Wu Yuan 2022-01-12 22:18:37 +05:30 committed by GitHub
parent a9495ecae0
commit fc38b9f2aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 545 additions and 377 deletions

View file

@ -167,14 +167,23 @@ Promoting the images basically means that images, that were pushed to staging co
- annotations
- artifacthub.io/prerelease: "true"
- artifacthub.io/changes: |
- Add the titles of the PRs merged after previous release
- Add the titles of the PRs merged after previous release here. I used the github-cli to get that list like so `gh pr list -s merged -L 38 -B main | cut -f1,2`
### d. Edit the values.yaml
### d. Edit the values.yaml and run helm-docs
- [Fields to edit in values.yaml](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml)
- tag
- digest
- [helm-docs](https://github.com/norwoodj/helm-docs) is a tool that generates the README.md for a helm-chart automatically. In the CI pipeline workflow of github actions (/.github/workflows/ci.yaml), you can see how helm-docs is used. But the CI pipeline is not designed to make commits back into the project. So we need to run helm-docs manually, and check in the resulting autogenerated README.md at the path /charts/ingress-nginx/README.md
```
GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.6.0
./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts
git diff --exit-code
rm -f ./helm-docs
```
Watchout for mistakes like leaving the helm-docs executable in your clone workspace or not not checking the new README.md manually etc.
### e. Edit the static manifests
- Prepare to use a script to update the edit the static manifests and set the "image", "digest", "version" etc. fields to the desired value.
@ -207,22 +216,57 @@ Promoting the images basically means that images, that were pushed to staging co
data:
http-snippet:|
server{
listen 2443;
return 308 https://$host$request_uri;
listen 2443;
return 308 https://$host$request_uri;
}
```
### f. Edit the changelog
[Changelog.md](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md)
- Add the PRs merged after previous release
- One useful command to get this list is
```
git log controller-v0.48.1..HEAD --pretty=%s
```
- Add the PRs merged after previous release
- If you use the github cli https://cli.github.com/, then that is one useful command to get this list of PRs
- One way of using gh cli and getting the list of PRs for changelog is described below
- Install and configure github cli as per the docs of gh-cli
- Change dir to your clone, of your fork, of the ingress-nginx project
- Run the below command and save the output to a txt file
```
gh pr list -s merged -L 38 -B main | cut -f1,2 > ~/tmp/prlist.txt
```
- The -L 38 was used for 2 reasons.
- Default number of results is 30 and there were more than 30 PRs merged while releasing v1.1.1.
- The other reason to use -L 38 was to ommit the 39th, the 40th and the 41st line in the resulting list. These were non-relevant PRs.
- Then use some easy automation in bash/python/whathaveyou to get the PR-List that can be used in the changelog
- I save output of above command to a file called prlist.txt. It looks somewhat like this ;
```
% cat ~/Downloads/prlist.txt
8129 fix syntax in docs for multi-tls example
8120 Update go in runner and release v1.1.1
8119 Update to go v1.17.6
8118 Remove deprecated libraries, update other libs
8117 Fix codegen errors
8115 chart/ghaction: set the correct permission to have access to push a release
....
```
- Then I use the bash scripty way seen below to convert those PR numbers into links. If I saved the below content in a script called prlist_to_changelog.sh, then I run the command `prlist_to_changelog.sh prlist.txt`
```
#!/usr/bin/bash
file="$1"
while read -r line; do
pr_num=`echo "$line" | cut -f1`
pr_title=`echo "$line" | cut -f2`
echo "[$pr_num](https://github.com/kubernetes/ingress-nginx/pull/$pr_num) $pr_title"
done <$file
```
### g. Edit the Documentation:
- Update the version in [docs/deploy/index.md](docs/deploy/index.md)
- Update Supported versions in the Support Versions table in the README.md
- Update the version in [docs/deploy/index.md](docs/deploy/index.md)
- Update Supported versions in the Support Versions table in the README.md
### h. Edit stable.txt