hammerkit

helm

Lint and package a Helm chart.

Lint and package a Helm chart. The tasks run in an alpine/helm container, need no cluster, and are skipped when the chart is unchanged.

.hammerkit.yaml
includes:
  helm:
    git: https://github.com/no0dles/hammerkit.git
    ref: v1.22.0
    path: catalog/helm

tasks:
  chart:
    deps: [helm:lint, helm:package]

Tasks

TaskWhat it doesReadsProduces
lintLint the chart with helm lint.CHART_DIRnothing
packagePackage the chart into dist.CHART_DIRdist

Inputs

InputDefaultMeaning
HELM_VERSION4.3.0Tag of the alpine/helm image the tasks run in, e.g. 3.19.5 or 4.3.0.
CHART_DIRchartFolder of the chart (with its Chart.yaml), relative to the working directory.

Talking to a cluster

The entry does not install or inspect releases, because that depends on a cluster and its credentials and cannot be cached. Run helm upgrade from a task of your own, or in your deploy pipeline.

The entry

catalog/helm/build.yaml
# Lints and packages a Helm chart. Nothing here talks to a cluster.
envs:
  # tag of the alpine/helm image helm runs in
  HELM_VERSION: 4.3.0
  # folder of the chart, relative to the working directory
  CHART_DIR: chart

tasks:
  lint:
    description: lint the chart with helm lint
    image: alpine/helm:${HELM_VERSION}
    src: ['${CHART_DIR}']
    cmds:
      - helm lint ${CHART_DIR}

  package:
    description: package the chart into dist
    image: alpine/helm:${HELM_VERSION}
    src: ['${CHART_DIR}']
    generates: [dist]
    cmds:
      - helm package ${CHART_DIR} --destination dist

On this page