- Go to
Settings -> Access Tokens
in your gitlab project - Add new token name, choose validtity, choose role as "maintainer", select scopes as "api, read_api"
- Click on "create project access token"
- Copy the created token in safe location.
Get the project-id
from gitlab project settings.
# Set the following environment variable
export HELM_REPO="https://gitlab.company.com/api/v4/projects/<project-id>/packages/helm/stable"
export HELM_REPO="https://gitlab.company.com/api/v4/projects/354/packages/helm/stable"
# add the repo to helm
helm repo add --username [email protected] --password glpat-iu7Zu-rbSc88siQkzBjN gitlab-helm $HELM_REPO
This section is WIP.
# add cm-push plugin
helm plugin install https://github.com/chartmuseum/helm-push
# package helm charts
helm package helm-charts
Successfully packaged chart and saved it to: /Users/nsankar/Projects/charts/my-service-1.0.0.tgz
# push the package to gitlab helm repo
helm cm-push ./my-service-1.0.0.tgz gitlab
Pushing my-service-1.0.0.tgz to gitlab...
Done.
## check whether dependency is available
helm dependency list
NAME VERSION REPOSITORY STATUS
my-service 1.0.0 https://gitlab.company.com/api/v4/projects/434/packages/helm/stable missing
### update dependency
helm dependency build
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "gitlab" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading my-service from repo https://gitlab.company.com/api/v4/projects/434/packages/helm/stable
Deleting outdated charts
### helm dependency update
helm dependency list
NAME VERSION REPOSITORY STATUS
my-service 1.0.0 https://gitlab.company.com/api/v4/projects/115/packages/helm/stable ok
### run helm commands
helm template . -f values-dev.yaml