forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: check updates for the Helm reference
Cilium's documentation has a reference for the Helm values supported in its Charts. The reference is auto-generated, and is supposed to be updated each time the Charts are modified. To help keep the reference up-to-date, Cilium's CI should warn when developers forgot to regenerate and commit the document. Because the CI reported missing updates in the past, we thought that this was covered. But it turns out that the CI would only complain when it _fails_ to update the Helm reference - typically when some words need to be added to the spelling list. If the update goes fine, there is no check in place to validate that the regenerated file is identical to the one currently in the repository. This has led to multiple PRs missing the update for the Helm reference in the past. Address the issue by adding a check-helmvalues.sh script to validate that the current file is identical to the version in Git's HEAD. Run this script from the Makefile, as part of the "check" target. We also create a "update-helm-values" target, which looks cleaner to add as a prerequisite for "check" instead of passing the name of a .rst file. We also introduce a "FORCE" phony target to explicitly mark that we want the file regenerated each time. Signed-off-by: Quentin Monnet <quentin@isovalent.com>
- Loading branch information
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
helm_values="${script_dir}/helm-values.rst" | ||
|
||
if ! git diff --quiet -- "${helm_values}" ; then | ||
git --no-pager diff "${helm_values}" | ||
echo "HINT: to fix this, run 'make -C Documentation update-helm-values'" | ||
exit 1 | ||
fi |
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