- Configure authentication on your Github account to use the SSH protocol instead of HTTP. Watch this tutorial to learn how to set up: https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
- Have the
make
anddocker
commands installed on your system. With this, you don't need the below mentionedhelm
and use containers for the needed steps instead. See this tutorial. - Create a fork this repository.
- Clone the forked repository to your local system:
git clone FORKED_REPOSITORY
- Add the address for the remote original repository:
git remote -v
git remote add upstream [email protected]:zabbix-community/helm-zabbix.git
git remote -v
- Create a branch. Example:
git checkout -b BRANCH_NAME
- Make sure you are on the correct branch using the following command. The branch in use contains the '*' before the name.
git branch
- Make your changes and tests to the new branch.
- Keep the
charts/zabbix/values.yaml
file updated with working default values in case any variables are referenced in the helm chart template files - Change the
appVersion
parameter incharts/zabbix/Chart.yaml
in case you have updated thezabbixImageTag
incharts/zabbix/values.yaml
(upgrade to a newer version released by Zabbix) - Verify your changes do not introduce syntactical/semantic errors:
- Do NOT change
version
incharts/zabbix/chart.yaml
nor incharts/zabbix/artifacthub-pkg.yml
, as this is now part of the release process issued by the code owners - Make any changes you want in
charts/zabbix/README.md
incharts/zabbix/README.md.gotmpl
, out of whichcharts/zabbix/README.md
will be generated usinghelm-docs
during the version release process by the code owners
Method to check for syntactical/semantic errors using make
and docker
:
cd charts/zabbix
make lint
- Method using locally installed
helm
command:
cd charts/zabbix
helm lint .
- Commit the changes to the branch.
- Push files to repository remote with command:
git push --set-upstream origin BRANCH_NAME
- Create Pull Request (PR) to the
main
branch. See this tutorial - Update the content with the suggestions of the reviewer (if necessary).
- After your pull request is merged to the
main
branch, update your local clone:
git checkout main
git pull upstream main
- Clean up after your pull request is merged with command:
git branch -d BRANCH_NAME
- Then you can update the
main
branch in your forked repository.
git push origin main
- And push the deletion of the feature branch to your GitHub repository with command:
git push --delete origin BRANCH_NAME
- To keep your fork in sync with the original repository, use these commands:
git pull upstream main
git pull upstream main --tags
git push origin main
git push origin main --tags
References:
To generate a new release of the helm chart, follow these instructions:
- Review and merge the opened PRs
- Run local tests
- Create a branch. Example:
git checkout -b BRANCH_NAME
Make sure you are on the correct branch using the following command. The branch in use will show with a '*' before the name.
git branch
- Make your changes and tests to the new branch
- Verify the syntax errors using the follow commands:
cd charts/zabbix
make lint
- Analyse the changes of the PRs merged and set a new release using the follow approach:
A major version" should be the "dot-release". Example: 6.0.2 -> 6.1.0 is be a major release update. Users have to check whether they have to modify their values.yaml, and we need to write a short explanation of what has changed in the chart/zabbix/README.md.gotmpl
.
A minor is the "dot-dot" release. Example: 6.0.2 -> 6.0.3 is minor upgrade, no changes in any APIs, interfaces etc. should be necessary.
- Change the
version
andappVersion
parameters (helm chart and Zabbix version, respectively) incharts/zabbix/Chart.yaml
andcharts/zabbix/artifacthub-pkg.yml
files. - Change the
createdAt
parameter incharts/zabbix/artifacthub-pkg.yml
file using the output of the commanddate +%Y-%m-%dT%TZ
command. - Change the
ZABBIX_CHART_VERSION
variable incharts/zabbix/artifacthub-pkg.yml
file. - Run the following commands to update the documentation of the helm chart.
cd charts/zabbix
make gen-docs
- Commit the changes to the branch.
- Push files to repository remote with command:
git push --set-upstream origin BRANCH_NAME
- Create Pull Request (PR) to the main branch. See this tutorial
- Update the content with the suggestions of the reviewer (if necessary).
- After your pull request is merged to the main branch, update your local clone:
git checkout main
git pull upstream main
- Clean up after your pull request is merged with command:
git branch -d BRANCH_NAME
Then you can update the main branch in your forked repository.
git push origin main
And push the deletion of the feature branch to your GitHub repository with command:
git push --delete origin BRANCH_NAME
- Create a new tag to generate a new release of the helm chart using the following commands:
git tag -a 6.1.0 -m "New release" #example
git push upstream --tags
- The before commands will start the pipeline and will generate a new release and tag in standad
zabbix-6.0.0
. - To keep your fork in sync with the original repository, use these commands:
git pull upstream main
git pull upstream main --tags
git push origin main
git push origin main --tags
- After this, edit and adjust the text generated automatically for new release and adjust the release notes follow the examples the other releases published in https://github.com/zabbix-community/helm-zabbix/releases
References:
Use a IDE (Integrated Development Environment) or text editor of your choice. By default, the use of VSCode is recommended.
VSCode (https://code.visualstudio.com), combined with the following plugins, helps the editing/review process, mainly allowing the preview of the content before the commit, analyzing the Markdown syntax and generating the automatic summary, as the section titles are created/changed.
Plugins to Visual Code:
- docker: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker (require docker-ce package)
- gitlens: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens (require git package)
- gotemplate-syntax: https://marketplace.visualstudio.com/items?itemName=casualjim.gotemplate
- Markdown-all-in-one: https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
- Markdown-lint: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
- Markdown-toc: https://marketplace.visualstudio.com/items?itemName=AlanWalk.markdown-toc
- shellcheck: https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck (require shellcheck package)
- YAML: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
- Helm Intellisense: https://marketplace.visualstudio.com/items?itemName=Tim-Koehler.helm-intellisense
Theme for VSCode: