Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.43 KB

development.md

File metadata and controls

100 lines (70 loc) · 2.43 KB

Development

Workflow

# clone repo
git clone git@github.com:adfinis-sygroup/helm-charts.git
cd helm-charts

# add personal fork to working copy
git remote add $FORK_NAME $FORK_GIT_REPO

# fetch origin before branching
git fetch origin

# switch to feature branch
git switch -c feat/my-feature origin/master

# do changes
vim charts/

# stage changes for commit
git add -p

# run pre-commit
pre-commit run -a

# restage changes
git add -p

# check changes
git diff --cached

# commit using commitizen
git cz

# or with plain git commit
git commit

# push to fork
git push $FORK_NAME

# add changes to last commit and force push
pre-commit run -a
git add -p
git commit --amend
git push $FORK_NAME --force-with-lease

Testing

A considerable amount of tests run on GitHub Actions on each push to the helm-charts repo. These should check for basic deployability and functionality of the charts. You should look at the test results while you are working on a pull request as they often contain log output that can help surface errors.

You can run most of the tests locally if you would like to, please refer to the hack/ci directory for examples on how to do so.

Before commiting you should test your changes using helm template. The charts usually have a few YAML files that can help you do so.

  • ci/*-values.yaml contains the values used in ci
  • examples/*.yaml contains examples used by the docs

You can look at manifests using these:

helm template \
  -f charts/infra-apps/ci/default-values.yaml \
  -f charts/infra-apps/examples/argocd.yaml \
  charts/infra-apps

In most cases you will want to test a variety of cases. If your case isn't covered yet, consider adding a new case to the charts ci/ folder (based on defaults-values.yaml). You can also add your use-cases to the examples/ folder.

Documentation

Most README files are autogenerated. Use pre-commit or the tools in hack/ to regenerate them.

More information is in the documentation docs.

pre-commit hook

This project uses pre-commit to automate some tasks like generating README files.

pre-commit requirements

pre-commit configuration

After installing the pre-commit requirements you can initialize pre-commit.

pre-commit install
pre-commit install-hooks