Skip to content

Git tag -> Docker image tag

[Source]

Suppose my-chart has default values.yaml:

image:
  repository: registry.gitlab.local/example/app
  tag: v1.0.0
...

If we need to create CI/CD pipeline, we need use next script

helm upgrade --instal my-release my-chart-repo/my-chart-app --set="image.tag=$CI_COMMIT_TAG" -n my-namespace

HelmWave allows use declarative way to approach this goal.

Project Structure

.
├── helmwave.yml
└── values.yml

helmwave.yml.tpl

version: 0.19.3

releases:
  - name: my-release
    chart:
      name: my-chart-repo/my-chart-app
    values:
      - values.yml
    namespace: my-namespace
    create_namespace: true

values.yml

This values will override default values

image:
  tag: {{ env "CI_COMMIT_TAG" }}

Run

helmwave build
helmwave up

or helmwave up --build