HelmDeploy@1 - Package and deploy Helm charts v1 task

Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands.

Syntax

# Package and deploy Helm charts v1
# Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands.
- task: HelmDeploy@1
  inputs:
  # Kubernetes Cluster
    #connectionType: 'Azure Resource Manager' # 'Azure Resource Manager' | 'Kubernetes Service Connection' | 'None'. Required when command != logout && command != package. Connection Type. Default: Azure Resource Manager.
    #azureSubscription: # string. Alias: azureSubscriptionEndpoint. Required when connectionType = Azure Resource Manager && command != logout && command != package. Azure subscription. 
    #azureResourceGroup: # string. Required when connectionType = Azure Resource Manager && command != logout && command != package. Resource group. 
    #kubernetesCluster: # string. Required when connectionType = Azure Resource Manager && command != logout && command != package. Kubernetes cluster. 
    #useClusterAdmin: false # boolean. Optional. Use when connectionType = Azure Resource Manager && command != logout && command != package. Use cluster admin credentials. Default: false.
    #kubernetesServiceConnection: # string. Alias: kubernetesServiceEndpoint. Required when connectionType = Kubernetes Service Connection && command != logout && command != package. Kubernetes Service Connection. 
    #namespace: # string. Optional. Use when command != logout && command != package. Namespace. 
  # Azure Container Registry
    #azureSubscriptionForACR: # string. Alias: azureSubscriptionEndpointForACR. Required when command == login || command == package || command == push. Azure subscription for Container Registry. 
    #azureResourceGroupForACR: # string. Required when command == login || command == package || command == push. Resource group. 
    #azureContainerRegistry: # string. Required when command == login || command == package || command == push. Azure Container Registry. 
  # Commands
    command: 'ls' # 'create' | 'delete' | 'expose' | 'get' | 'init' | 'install' | 'login' | 'logout' | 'ls' | 'package' | 'push' | 'rollback' | 'upgrade' | 'uninstall'. Required. Command. Default: ls.
    #chartType: 'Name' # 'Name' | 'FilePath'. Required when command == install || command == upgrade. Chart Type. Default: Name.
    chartName: # string. Required when chartType == Name. Chart Name. 
    #chartPath: # string. Required when chartType == FilePath || command == package. Chart Path. 
    #chartVersion: # string. Alias: version. Optional. Use when command == package || command == install || command == upgrade. Version. 
    #releaseName: # string. Optional. Use when command == install || command == upgrade. Release Name. 
    #overrideValues: # string. Optional. Use when command == install || command == upgrade. Set Values. 
    #valueFile: # string. Optional. Use when command == install || command == upgrade. Value File. 
    #destination: '$(Build.ArtifactStagingDirectory)' # string. Optional. Use when command == package. Destination. Default: $(Build.ArtifactStagingDirectory).
    #canaryimage: false # boolean. Optional. Use when command == init. Use canary image version. Default: false.
    #upgradetiller: true # boolean. Optional. Use when command == init. Upgrade Tiller. Default: true.
    #updatedependency: false # boolean. Optional. Use when command == install || command == package. Update Dependency. Default: false.
    #save: true # boolean. Optional. Use when command == package. Save. Default: true.
    #install: true # boolean. Optional. Use when command == upgrade. Install if release not present. Default: true.
    #recreate: false # boolean. Optional. Use when command == upgrade. Recreate Pods. Default: false.
    #resetValues: false # boolean. Optional. Use when command == upgrade. Reset Values. Default: false.
    #force: false # boolean. Optional. Use when command == upgrade. Force. Default: false.
    #waitForExecution: true # boolean. Optional. Use when command == init || command == install || command == upgrade. Wait. Default: true.
    #arguments: # string. Optional. Use when command != login && command != logout. Arguments. 
    #chartNameForACR: # string. Required when command == package || command == push. Chart Name For Azure Container Registry. 
    #chartPathForACR: # string. Required when command == package || command == push. Chart Path for Azure Container Registry. 
  # TLS
    #enableTls: false # boolean. Optional. Use when command != login && command != logout && command != package. Enable TLS. Default: false.
    #caCert: # string. Required when enableTls == true && command != login && command != logout && command != package. CA certificate. 
    #certificate: # string. Required when enableTls == true && command != login && command != logout && command != package. Certificate. 
    #privatekey: # string. Required when enableTls == true && command != login && command != logout && command != package. Key. 
  # Advanced
    #tillernamespace: # string. Optional. Use when command != login && command != logout && command != package. Tiller namespace. 
    #failOnStderr: false # boolean. Optional. Use when command != login && command != logout && command != package. Fail on Standard Error. Default: false.
    #publishPipelineMetadata: true # boolean. Optional. Use when command != login && command != logout && command != package. Publish pipeline metadata. Default: true.

Inputs

connectionType - Connection Type
string. Required when command != logout && command != package. Allowed values: Azure Resource Manager, Kubernetes Service Connection, None. Default value: Azure Resource Manager.

Select 'Azure Resource Manager' to connect to an Azure Kubernetes Service by using Azure Service Connection. Select 'Kubernetes Service Connection' to connect to any Kubernetes cluster by using kubeconfig or Service Account.


azureSubscription - Azure subscription
Input alias: azureSubscriptionEndpoint. string. Required when connectionType = Azure Resource Manager && command != logout && command != package.

Select an Azure subscription, which has your Azure Container Registry.


azureResourceGroup - Resource group
string. Required when connectionType = Azure Resource Manager && command != logout && command != package.

Select an Azure Resource Group.


kubernetesCluster - Kubernetes cluster
string. Required when connectionType = Azure Resource Manager && command != logout && command != package.

Select an Azure Managed Cluster.


useClusterAdmin - Use cluster admin credentials
boolean. Optional. Use when connectionType = Azure Resource Manager && command != logout && command != package. Default value: false.

Use cluster administrator credentials instead of default cluster user credentials.


kubernetesServiceConnection - Kubernetes Service Connection
Input alias: kubernetesServiceEndpoint. string. Required when connectionType = Kubernetes Service Connection && command != logout && command != package.

Select a Kubernetes service connection.


namespace - Namespace
string. Optional. Use when command != logout && command != package.

Specify K8 namespace to use. Use Tiller namespace can be specified in the advanced section of the task or by passing the --tiller-namespace option as argument.


azureSubscriptionForACR - Azure subscription for Container Registry
Input alias: azureSubscriptionEndpointForACR. string. Required when command == login || command == package || command == push.

Select an Azure subscription, which has your Azure Container Registry.


azureResourceGroupForACR - Resource group
string. Required when command == login || command == package || command == push.

Select an Azure Resource Group, which has your Container Registry.


azureContainerRegistry - Azure Container Registry
string. Required when command == login || command == package || command == push.

Select an Azure Container Registry which will be used for pushing helm charts.


command - Command
string. Required. Allowed values: create, delete, expose, get, init, install, login, logout, ls, package, push, rollback, upgrade, uninstall. Default value: ls.

Select a helm command.


chartType - Chart Type
string. Required when command == install || command == upgrade. Allowed values: Name, FilePath (File Path). Default value: Name.

Select how you want to enter chart info. You can either provide name of the chart or folder/file path to the chart.


chartName - Chart Name
string. Required when chartType == Name.

Chart reference to install, this can be a url or a chart name. For example, if chart name is 'stable/mysql', the task will run 'helm install stable/mysql'.


chartPath - Chart Path
string. Required when chartType == FilePath || command == package.

Path to the chart to install. This can be a path to a packaged chart or a path to an unpacked chart directory. For example, if './redis' is specified the task will run 'helm install ./redis'.


chartVersion - Version
Input alias: version. string. Optional. Use when command == package || command == install || command == upgrade.

Specify the exact chart version to install. If this is not specified, the latest version is installed. Set the version on the chart to this semver version​.


releaseName - Release Name
string. Optional. Use when command == install || command == upgrade.

Release name. If unspecified, it will autogenerate one for you.


overrideValues - Set Values
string. Optional. Use when command == install || command == upgrade.

Set values on the command line (can specify multiple or separate values with commas or newlines: key1=val1,key2=val2 or
key1=val1
key2=val2
). The task will construct the helm command by using these set values. For example, helm install --set key1=val1 ./redis.


valueFile - Value File
string. Optional. Use when command == install || command == upgrade.

Specify values in a YAML file or a URL. For example, specifying myvalues.yaml will result in 'helm install --values=myvals.yaml'.


destination - Destination
string. Optional. Use when command == package. Default value: $(Build.ArtifactStagingDirectory).

Specify values in a YAML file or a URL.


canaryimage - Use canary image version.
boolean. Optional. Use when command == init. Default value: false.

Use the canary Tiller image, the latest pre-release version of Tiller.


upgradetiller - Upgrade Tiller
boolean. Optional. Use when command == init. Default value: true.

Upgrade if Tiller is already installed.


updatedependency - Update Dependency
boolean. Optional. Use when command == install || command == package. Default value: false.

Run helm dependency update before installing the chart. Update dependencies from 'requirements.yaml' to dir 'charts/' before packaging.


save - Save
boolean. Optional. Use when command == package. Default value: true.

Save packaged chart to local chart repository (default true)​.


install - Install if release not present.
boolean. Optional. Use when command == upgrade. Default value: true.

If a release by this name doesn't already exist, run an install​.


recreate - Recreate Pods.
boolean. Optional. Use when command == upgrade. Default value: false.

Performs pods restart for the resource if applicable.


resetValues - Reset Values.
boolean. Optional. Use when command == upgrade. Default value: false.

Reset the values to the ones built into the chart.


force - Force
boolean. Optional. Use when command == upgrade. Default value: false.

Force resource update through delete/recreate if needed​.


waitForExecution - Wait
boolean. Optional. Use when command == init || command == install || command == upgrade. Default value: true.

Block till command execution completes.


arguments - Arguments
string. Optional. Use when command != login && command != logout.

Helm command options.


enableTls - Enable TLS
boolean. Optional. Use when command != login && command != logout && command != package. Default value: false.

Enables using SSL between Helm and Tiller.


caCert - CA certificate
string. Required when enableTls == true && command != login && command != logout && command != package.

CA cert used to issue certificate for tiller and helm client.


certificate - Certificate
string. Required when enableTls == true && command != login && command != logout && command != package.

Specify Tiller certificate or Helm client certificate.


privatekey - Key
string. Required when enableTls == true && command != login && command != logout && command != package.

Specify Tiller Key or Helm client key.


tillernamespace - Tiller namespace
string. Optional. Use when command != login && command != logout && command != package.

Specify K8 namespace of tiller.


failOnStderr - Fail on Standard Error
boolean. Optional. Use when command != login && command != logout && command != package. Default value: false.

If this is true, this task will fail if any errors are written to the error pipeline, or if any data is written to the Standard Error stream. Otherwise the task will rely on the exit code to determine failure.


publishPipelineMetadata - Publish pipeline metadata
boolean. Optional. Use when command != login && command != logout && command != package. Default value: true.

If this is true, the task will collect and publish deployment metadata.


chartNameForACR - Chart Name For Azure Container Registry
string. Required when command == package || command == push.

Chart name with which the chart will be stored in Azure Container Registry.


chartPathForACR - Chart Path for Azure Container Registry
string. Required when command == package || command == push.

Path to the chart directory.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.

helmExitCode
Exit code emitted from the execution of specified Helm command

helmOutput
Output emitted from the execution of specified Helm command

Remarks

A major change for HelmDeploy@1 task is that helm chart commands are removed:

  • The helm chart subcommand has been removed
  • helm chart push has been replaced with helm push
  • helm chart remove has been removed
  • helm chart save has been replaced with helm package
  • helm save has been removed

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Deploy