Metadata-Version: 2.1
Name: chart_releaser
Version: 1.0.2
Summary: Helm chart releaser tools
License: MIT
Author: Trusikhin Andrei
Author-email: andrei.trusikhin@gmail.com
Requires-Python: >=3.8
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: pyyaml (>=6.0.0,<7.0.0)
Requires-Dist: requests (>=2.26.0,<3.0.0)
Project-URL: Documentation, https://github.com/Onder7994/chart_releaser#readme
Project-URL: Homepage, https://github.com/Onder7994/chart_releaser
Project-URL: Repository, https://github.com/Onder7994/chart_releaser
Description-Content-Type: text/markdown

# Helm chart releaser

This tool **requirement helm binary in machine.**

The utility can create a helm package and upload it to the gitlab registry in the **stable** or **develop** channel.
[More information in gitlab documentation](https://docs.gitlab.com/ee/user/packages/helm_repository/)

When uploading to develop channel, the same versions are allowed to be uploaded. When installing helm will take the last downloaded version.

Uploading identical versions to stable channel is forbidden in the code.

# CLI and default vars

1. **-t || --token** - token for registry. Override if env **CHART_RELEASE_TOKEN** is exist.
2. **--ssl** - path to SSL certificate for registry. Override if env **SSL_PATH** is exist. Default value **/usr/local/share/ca-certificates/CA.crt**.
3. **-u || --registry-url** - registry URL, domain only like gitlab.com. Override if env **REGISTRY_URL** is exist. Default **gitlab.com**.
4. **-p || --project-id** - CI_PROJECT_ID for gitlab registry. Override if env **RELEASE_PROJECT_ID** is exist.
5. **-n || --chart-name** - chart name.
6. **-path** - path to Chart.yaml.
7. **-c || --config** - path to config file. Override if env **TOOL_CONFIG_PATH** is exist. Default **hc-releaser.config**. File exist in repository and need for local development, because for gitlab registy must use headers with **JOB-TOKEN** if you usage **CI_JOB_TOKEN** and **PRIVATE-TOKEN** if you usage your private token. This is dynamic paramenter and by default usage **JOB-TOKEN**. If config does not exist usage **JOB_TOKEN** also. 
8. **-b || --branch** - branch for release_stage. 


# Usage

Run helm lint

```bash
hc-releaser helm linting -p <path to helm chart>
```
Optional key **-d** || **--debug** - bolean. If set, helm running with debug mode.

Create and upload pre release helm package

```bash
hc-releaser helm release_stage -t <gitlab_token> -u <gitlab url. Domain only> -p <gitlab_project_id> -n <chart_name> -path <path to dir with Chart.yaml>
```

Create and upload release helm package

```bash
hc-releaser helm release -t <gitlab_token> -u <gitlab url. Domain only> -p <gitlab_project_id> -n <chart_name> -path <path to dir with Chart.yaml>
```

Check version in package registry

```bash
hc-releaser helm check -t <gitlab_token> -u <gitlab url. Domain only> -p <gitlab_project_id> -n <chart_name> -path <path to dir with Chart.yaml>
```

