Skip to content

Commit

Permalink
build: auto generate table of chart configuration parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed Sep 2, 2024
1 parent 42b9a87 commit 80ebff0
Show file tree
Hide file tree
Showing 9 changed files with 1,007 additions and 700 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ body:
attributes:
label: Selenium Grid chart version (chart version)
description: What version of Selenium Grid chart are you using?
placeholder: 0.34.2?
placeholder: 0.35.0?
validations:
required: false
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ jobs:
run: echo ${LATEST_TAG}
- name: Update tag in docs and files
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG}
- name: Update chart configuration docs
run: make generate_readme_charts
- name: Build Helm chart
uses: nick-invision/retry@master
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ jobs:
with:
python-version: '3.11'
check-latest: true
- name: Verify chart configuration up-to-date
run: make lint_readme_charts
- name: Get branch name (only for push to branch)
if: github.event_name == 'push'
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
Expand Down
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,23 @@ format_shell_scripts:
EXIT_CODE=$$? ; \
if [ $$EXIT_CODE -ne 0 ]; then \
echo "Some shell scripts are not formatted. Please run 'make format_shell_scripts' to format and update them." ; \
exit 1 ; \
exit $$EXIT_CODE ; \
fi ; \
exit $$EXIT_CODE

generate_readme_charts:
if [ ! -f $$HOME/go/bin/helm-docs ] ; then \
echo "helm-docs is not installed. Please install it or run 'make setup_dev_env' once." ; \
else \
$$HOME/go/bin/helm-docs --chart-search-root charts/selenium-grid --output-file CONFIGURATION.md --sort-values-order file ; \
fi

lint_readme_charts: generate_readme_charts
git diff --stat --exit-code ; \
EXIT_CODE=$$? ; \
if [ $$EXIT_CODE -ne 0 ]; then \
echo "New changes in chart. Please run 'make generate_readme_charts' to update them." ; \
exit $$EXIT_CODE ; \
fi ; \
exit $$EXIT_CODE

Expand Down
479 changes: 479 additions & 0 deletions charts/selenium-grid/CONFIGURATION.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions charts/selenium-grid/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ dependencies:
maintainers:
- name: SeleniumHQ
email: selenium-developers@googlegroups.com
url: https://github.com/SeleniumHQ
sources:
- https://github.com/SeleniumHQ/docker-selenium
352 changes: 10 additions & 342 deletions charts/selenium-grid/README.md

Large diffs are not rendered by default.

847 changes: 491 additions & 356 deletions charts/selenium-grid/values.yaml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions tests/charts/make/chart_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ sudo cp -frp /opt/ct/etc /etc/ct
rm -rf ct.tar.gz
ct version
echo "==============================="
echo "Installing helm-docs for AMD64 / ARM64"
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
$HOME/go/bin/helm-docs -h
echo "==============================="
echo "Installing envsubst for AMD64 / ARM64"
ENVSUBST_VERSION="v1.4.2"
ARCH=$(if [ "$(dpkg --print-architecture)" = "amd64" ]; then echo "x86_64"; else echo "$(dpkg --print-architecture)"; fi)
Expand Down

0 comments on commit 80ebff0

Please sign in to comment.