Skip to content

Commit

Permalink
[Feature] Docker support for chart-testing (ray-project#623)
Browse files Browse the repository at this point in the history
* update ct script

* split long command

* Update DEVELOPMENT.md

Signed-off-by: jasoonn <[email protected]>

Signed-off-by: jasoonn <[email protected]>
Co-authored-by: Ubuntu <azureuser@Ubuntu.pqxb1uggpgbehcpt4orv5untcb.rx.internal.cloudapp.net>
  • Loading branch information
jasoonn and Ubuntu authored Oct 9, 2022
1 parent e5fd52b commit 571b484
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion helm-chart/script/chart-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ export CURRENT_PATH=$(cd "${PWD}">/dev/null; pwd)
export KUBERAY_HOME=${CURRENT_PATH}/../../

cd $KUBERAY_HOME
ct lint --all --chart-dirs helm-chart/ --validate-maintainers=false
if [ "$#" == 1 ] && [ "$1" == "local" ]; then
ct lint --all --chart-dirs helm-chart/ --validate-maintainers=false
else
docker run -it --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro \
--volume $(pwd):/data quay.io/helmpack/chart-testing:v3.5.0 \
ct lint --all --chart-dirs helm-chart/ --validate-maintainers=false
fi
7 changes: 6 additions & 1 deletion ray-operator/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ IMG=kuberay/operator:nightly make deploy

We have [chart lint tests](https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm-lint.yaml) with Helm v3.4.1 and Helm v3.9.4 on GitHub Actions. We also provide a script to execute the lint tests on your laptop. If you cannot reproduce the errors on GitHub Actions, the possible reason is the different version of Helm. Issue [#537](https://github.com/ray-project/kuberay/issues/537) is an example that some errors only happen in old helm versions.

Run tests with docker
```bash
./helm-chart/script/chart-test.sh
```
Run tests on your local environment
* Step1: Install `ct` (chart-testing) and related dependencies. See https://github.com/helm/chart-testing for more details.
* Step2: `./helm-chart/script/chart-test.sh`
* Step2: `./helm-chart/script/chart-test.sh local`

### Consistency check

Expand Down

0 comments on commit 571b484

Please sign in to comment.