-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gerald Pape <[email protected]>
- Loading branch information
1 parent
8b20427
commit c61ebc7
Showing
9 changed files
with
2,054 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ jobs: | |
- 'NGINX_BASE' | ||
charts: | ||
- 'charts/ingress-nginx/Chart.yaml' | ||
- 'charts/ingress-nginx/values.schema.json' | ||
- 'charts/ingress-nginx/**/*' | ||
- 'NGINX_BASE' | ||
baseimage: | ||
|
@@ -94,7 +95,7 @@ jobs: | |
- name: Run test | ||
run: make test | ||
|
||
|
||
verify-docs: | ||
name: Verify Doc generation | ||
runs-on: ubuntu-latest | ||
|
@@ -227,13 +228,24 @@ jobs: | |
- name: Run chart-testing (lint) | ||
run: ct lint --config ./.ct.yaml | ||
|
||
- name: Run helm-schema | ||
run: | | ||
GOBIN=$PWD GO111MODULE=on go install github.com/dadav/helm-schema/cmd/[email protected] | ||
./helm-schema --chart-search-root=${GITHUB_WORKSPACE}/charts --skip-auto-generation title,description,required,default,additionalProperties | ||
DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/ingress-nginx/values.schema.json) | ||
if [ ! -z "$DIFF" ]; then | ||
echo "Please use dadav/helm-schema in your clone, of your fork, of the project, and commit a updated values.schema.json for the chart. https://github.com/kubernetes/ingress-nginx/blob/main/MANUAL_RELEASE.md#d-edit-the-valuesyaml-and-run-helm-schema-and-helm-docs" | ||
fi | ||
git diff --exit-code | ||
rm -f ./helm-schema | ||
- name: Run helm-docs | ||
run: | | ||
GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/[email protected] | ||
./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts | ||
DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/ingress-nginx/README.md) | ||
if [ ! -z "$DIFF" ]; then | ||
echo "Please use helm-docs in your clone, of your fork, of the project, and commit a updated README.md for the chart. https://github.com/kubernetes/ingress-nginx/blob/main/RELEASE.md#d-edit-the-valuesyaml-and-run-helm-docs" | ||
echo "Please use helm-docs in your clone, of your fork, of the project, and commit a updated README.md for the chart. https://github.com/kubernetes/ingress-nginx/blob/main/MANUAL_RELEASE.md#d-edit-the-valuesyaml-and-run-helm-schema-and-helm-docs" | ||
fi | ||
git diff --exit-code | ||
rm -f ./helm-docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,17 +181,17 @@ Promoting the images basically means that images, that were pushed to staging co | |
- If you save the output of above command to a file called prlist.txt. It looks somewhat like this ; | ||
|
||
``` | ||
% cat ~/Downloads/prlist.txt | ||
% 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 | ||
8115 chart/ghaction: set the correct permission to have access to push a release | ||
.... | ||
``` | ||
You can delete the lines, that refer to PRs of the release process itself. We only need to list the feature/bugfix PRs. You can also delete the lines that are housekeeping or not really worth mentioning in the changelog. | ||
- you use some easy automation in bash/python/other, to get the PR-List that can be used in the changelog. For example, its possible to use a bash scripty way, seen below, to convert those plaintext PR numbers into clickable links. | ||
- you use some easy automation in bash/python/other, to get the PR-List that can be used in the changelog. For example, its possible to use a bash scripty way, seen below, to convert those plaintext PR numbers into clickable links. | ||
|
||
``` | ||
#!/usr/bin/bash | ||
|
@@ -225,20 +225,22 @@ Promoting the images basically means that images, that were pushed to staging co | |
prlist_to_changelog.sh ~/Downloads/prlist.txt | tee ~/Downloads//changelog_content.txt | ||
``` | ||
|
||
### d. Edit the values.yaml and run helm-docs | ||
### d. Edit the values.yaml and run helm-schema and 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 | ||
- [helm-docs](https://github.com/norwoodj/helm-docs) and [helm-schema](https://github.com/dadav/helm-schema) are tools that generates the README.md and values.schema.json for a helm-chart automatically. In the CI pipeline workflow of github actions (/.github/workflows/ci.yaml), you can see how helm-docs and helm-schema are used. But the CI pipeline is not designed to make commits back into the project. So we need to run helm-docs and helm-schema manually, and check in the resulting autogenerated README.md and values.schema.json files located at the path /charts/ingress-nginx/ | ||
``` | ||
GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/[email protected] | ||
GOBIN=$PWD GO111MODULE=on go install github.com/dadav/helm-schema/cmd/[email protected] | ||
./helm-schema --chart-search-root=${GITHUB_WORKSPACE}/charts --skip-auto-generation title,description,required,default,additionalProperties | ||
./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts | ||
git diff --exit-code | ||
rm -f ./helm-docs | ||
rm -f ./helm-docs ./helm-schema | ||
``` | ||
Watchout for mistakes like leaving the helm-docs executable in your clone workspace or not checking the new README.md manually etc. | ||
Watchout for mistakes like leaving the executables in your clone workspace or not checking the updated files manually etc. | ||
|
||
### e. Edit the static manifests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.