Skip to content

Latest commit

 

History

History
231 lines (162 loc) · 8.01 KB

CONTRIBUTING.md

File metadata and controls

231 lines (162 loc) · 8.01 KB

Contributing

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 in charts/zabbix/Chart.yaml in case you have updated the zabbixImageTag in charts/zabbix/values.yaml (upgrade to a newer version released by Zabbix)
  • Verify your changes do not introduce syntactical/semantic errors:
  • Do NOT change version in charts/zabbix/chart.yaml nor in charts/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 in charts/zabbix/README.md.gotmpl, out of which charts/zabbix/README.md will be generated using helm-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:

For code mainteners only

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 and appVersion parameters (helm chart and Zabbix version, respectively) in charts/zabbix/Chart.yaml and charts/zabbix/artifacthub-pkg.yml files.
  • Change the createdAt parameter in charts/zabbix/artifacthub-pkg.yml file using the output of the command date +%Y-%m-%dT%TZ command.
  • Change the ZABBIX_CHART_VERSION variable in charts/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

References:

About Visual Code (VSCode)

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:

Theme for VSCode: