Skip to content

Commit 80ebff0

Browse files
committed
build: auto generate table of chart configuration parameter
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 42b9a87 commit 80ebff0

File tree

9 files changed

+1007
-700
lines changed

9 files changed

+1007
-700
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ body:
6464
attributes:
6565
label: Selenium Grid chart version (chart version)
6666
description: What version of Selenium Grid chart are you using?
67-
placeholder: 0.34.2?
67+
placeholder: 0.35.0?
6868
validations:
6969
required: false

Diff for: .github/workflows/deploy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101
run: echo ${LATEST_TAG}
102102
- name: Update tag in docs and files
103103
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG}
104+
- name: Update chart configuration docs
105+
run: make generate_readme_charts
104106
- name: Build Helm chart
105107
uses: nick-invision/retry@master
106108
with:

Diff for: .github/workflows/helm-chart-test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ jobs:
9999
with:
100100
python-version: '3.11'
101101
check-latest: true
102+
- name: Verify chart configuration up-to-date
103+
run: make lint_readme_charts
102104
- name: Get branch name (only for push to branch)
103105
if: github.event_name == 'push'
104106
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV

Diff for: Makefile

+17-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,23 @@ format_shell_scripts:
6767
EXIT_CODE=$$? ; \
6868
if [ $$EXIT_CODE -ne 0 ]; then \
6969
echo "Some shell scripts are not formatted. Please run 'make format_shell_scripts' to format and update them." ; \
70-
exit 1 ; \
70+
exit $$EXIT_CODE ; \
71+
fi ; \
72+
exit $$EXIT_CODE
73+
74+
generate_readme_charts:
75+
if [ ! -f $$HOME/go/bin/helm-docs ] ; then \
76+
echo "helm-docs is not installed. Please install it or run 'make setup_dev_env' once." ; \
77+
else \
78+
$$HOME/go/bin/helm-docs --chart-search-root charts/selenium-grid --output-file CONFIGURATION.md --sort-values-order file ; \
79+
fi
80+
81+
lint_readme_charts: generate_readme_charts
82+
git diff --stat --exit-code ; \
83+
EXIT_CODE=$$? ; \
84+
if [ $$EXIT_CODE -ne 0 ]; then \
85+
echo "New changes in chart. Please run 'make generate_readme_charts' to update them." ; \
86+
exit $$EXIT_CODE ; \
7187
fi ; \
7288
exit $$EXIT_CODE
7389

Diff for: charts/selenium-grid/CONFIGURATION.md

+479
Large diffs are not rendered by default.

Diff for: charts/selenium-grid/Chart.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ dependencies:
2525
maintainers:
2626
- name: SeleniumHQ
2727
28+
url: https://github.com/SeleniumHQ
2829
sources:
2930
- https://github.com/SeleniumHQ/docker-selenium

Diff for: charts/selenium-grid/README.md

+10-342
Large diffs are not rendered by default.

Diff for: charts/selenium-grid/values.yaml

+491-356
Large diffs are not rendered by default.

Diff for: tests/charts/make/chart_setup_env.sh

+4
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ sudo cp -frp /opt/ct/etc /etc/ct
156156
rm -rf ct.tar.gz
157157
ct version
158158
echo "==============================="
159+
echo "Installing helm-docs for AMD64 / ARM64"
160+
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
161+
$HOME/go/bin/helm-docs -h
162+
echo "==============================="
159163
echo "Installing envsubst for AMD64 / ARM64"
160164
ENVSUBST_VERSION="v1.4.2"
161165
ARCH=$(if [ "$(dpkg --print-architecture)" = "amd64" ]; then echo "x86_64"; else echo "$(dpkg --print-architecture)"; fi)

0 commit comments

Comments
 (0)