How to Deploy With Helm Using HelmDeploy in Azure Pipelines
HelmDeploy@0 runs helm upgrade with install against your cluster so a release is created or updated in one step.
Install the Helm CLI with HelmInstaller@1, then run HelmDeploy@0 with command: upgrade, your chart path, release name, and --set overrides.
Steps
- Add
HelmInstaller@1to pin the Helm version. - Add
HelmDeploy@0withcommand: upgradeandinstall: true. - Set
releaseName,chartType: FilePath, andchartPath. - Pass image tags through
overrideValues.
azure-pipelines.yml
azure-pipelines.yml
pool:
vmImage: ubuntu-latest
steps:
- task: HelmInstaller@1
inputs:
helmVersionToInstall: '3.14.0'
- task: HelmDeploy@0
inputs:
connectionType: 'Kubernetes Service Connection'
kubernetesServiceConnection: 'aks-prod'
namespace: 'web'
command: upgrade
chartType: FilePath
chartPath: 'charts/web'
releaseName: 'web'
install: true
overrideValues: 'image.tag=$(Build.BuildId)'Gotchas
- Without
install: true, the first deploy fails because the release does not yet exist. - Comma-separate multiple
overrideValues; do not add stray spaces around the equals sign.
Related guides
How to Deploy to AKS With KubernetesManifest in Azure PipelinesDeploy Kubernetes manifests to Azure Kubernetes Service from Azure Pipelines with the KubernetesManifest@1 ta…
How to Deploy a Bicep Template in Azure PipelinesDeploy an ARM or Bicep template from Azure Pipelines with the AzureResourceManagerTemplateDeployment task, su…