The YAML schema for HelmDeploy native step is as follows:
pipelines: - name: <string> steps: - name: <string> type: HelmDeploy configuration: #inherits all the tags from bash; https://www.jfrog.com/confluence/display/JFROG/Bash helmVersion: <2 | 3> # optional, defaults to 2 namespace: <string> # optional, namespace to which to deploy flags: <string> # optional valueFilePaths: # optional - <path and filename> releaseName: <string> chartPath: <path string> # optional, may be required for certain input resources chartName: <path string> # optional, may be required for certain input resources chartVersion: <path string> # optional, may be required for certain input resources dryRun: <true | false> # optional, only deploys if the dryrun is success lint: <true | false> # lints chart before upgrade, default false lintFlags: “--strict” test: <true | false> # runs helm test after upgrade, default false testFlags: “--parallel” integrations: - name: <kubernetes integration> # required inputResources: - name: <HelmChart, GitRepo, FileSpec, BuildInfo or ReleaseBundle resource> # required, one input resource from this list is required # HelmChart and GitRepo input resources are allowed together execution: onStart: - echo "Preparing for work..." onSuccess: - echo "Job well done!" onFailure: - echo "uh oh, something went wrong" onComplete: #always - echo "Cleaning up some stuff" |
An alphanumeric string (underscores are permitted) that identifies the step.
Must be HelmDeploy
for this step type.
Specifies all configuration selections for the step's execution environment. This step inherits the Bash/PowerShell step configuration tags, including these pertinent tags:
Tag | Description of usage | Required/Optional |
---|---|---|
integrations | Must specify a Kubernetes Integration. or Must specify an Artifactory Integration when | Required May be required |
inputResources | Must specify HelmChart, GitRepo, FileSpec ,BuildInfo or ReleaseBundle resource that contains a Helm chart. | Required |
In addition, these tags can be defined to support the step's native operation:
All native steps derive from the Bash step. This means that all steps share the same base set of tags from Bash, while native steps have their own additional tags as well that support the step's particular function. So it's important to be familiar with the Bash step definition, since it's the core of the definition of all other steps. |
Tag | Description of usage | Required/Optional | |
---|---|---|---|
helmVersion | A number representing the major version of Helm to use. Can be 2 or 3. Defaults to 2. | Optional | |
namespace | The namespace to which to deploy. This will be added to the deploy command as a --namespace parameter. | Optional | |
flags | A flag string to be included in the Helm command. For example: "--set key=’value’ -f myTestValues.yaml" | Optional | |
valueFilePaths | Specifies values YAML file(s) for use with a--values (-f) option of the All environment variable referenced in the specified file(s) are automatically replaced with values of matching runtime environment variables. | Optional | |
releaseName | The release name. Equivalent to the --name (-n) option of the | Required | |
chartPath | The path to the Helm chart in the
| May be required | |
chartName | The name of the Helm chart in the
| May be required | |
chartVersion | The name of the Helm chart in the
| May be required | |
dryRun | When true, only deploys if the --dry-run install simulation is successful. Defaults to | Optional | |
lint | When set to true, performs a Defaults to | Optional | |
lintFlags | Flag string to pass to the helm lint command. | Optional | |
test | When set to true, performs a Defaults to | Optional | |
testFlags | Flag string to pass to the helm test command. | Optional |
Declares collections of shell command sequences to perform for pre- and post-execution phases:
Tag | Description of usage | Required/Optional |
---|---|---|
onStart | Commands to execute in advance of the native operation | Optional |
onSuccess | Commands to execute on successful completion | Optional |
onFailure | Commands to execute on failed completion | Optional |
onComplete | Commands to execute on any completion | Optional |
The actions performed for the onExecute
phase are inherent to this step type and may not be overridden.
The following examples show how to configure a HelmDeploy step.
A HelmDeploy step using Helm 3 and a HelmChart resource input.
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace releaseName: myHelmRelease integrations: - name: kubernetes_integration inputResources: - name: helmChartResource |
A HelmDeploy step using Helm 3 and a HelmChart resource input with values files and a dry run before the deployment.
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace releaseName: myHelmRelease dryRun: true valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: helmChartResource |
A HelmDeploy step with a GitRepo input instead of a HelmChart and lint and test commands.
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: gitRepoResource |
A HelmDeploy step with a FileSpec input resource. When using the FileSpec input resource, use the chartPath
property to specify where the Helm chart file is in the FileSpec resource. If the FileSpec represents a Generic repository in Artifactory that contains the Helm chart, use the following configuration as a reference:
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: fileSpecResource |
If the FileSpec input resource represents a Helm repository in Artifactory, you will also need to provide the chartName
and chartVersion
configuration properties:
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" chartName: "myChartName" chartVersion: 0.0.1 releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: fileSpecResource |
A HelmDeploy step with a BuildInfo input resource. When using the BuildInfo input resource, use the chartPath
property to specify where the Helm chart file is in the BuildInfo resource. If the BuildInfo represents a Generic repository in Artifactory that contains the Helm chart, use the following configuration as a reference:
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: buildInfoResource |
If the BuildInfo input resource represents a Helm repository in Artifactory, you will also need to provide the chartName
and chartVersion
configuration properties:
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" chartName: "myChartName" chartVersion: 0.0.1 releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration inputResources: - name: buildInfoResource |
A HelmDeploy step with a ReleaseBundle input resource. When using the ReleaseBundle input resource you will need to specify where the Helm chart file is in the ReleaseBundle resource using the chartPath property.
If the ReleaseBundle represents a Generic repository in Artifactory that contains the Helm chart, please use the following configuration as a reference:
You must specify an Artifactory Integration when |
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration - name: artifactory_integration inputResources: - name: releaseBundleResource |
If the ReleaseBundle input resource represents a Helm repository in Artifactory, you will also have to specify chartName and chartVersion configuration properties:
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 3 namespace: my-namespace chartPath: "./myChart" chartName: "myChartName" chartVersion: 0.0.1 releaseName: myHelmRelease lint: true lintFlags: "--strict" test: true testFlags: "--parallel" valueFilePaths: - values/values1.yaml - values/values2.yaml integrations: - name: kubernetes_integration - name: artifactory_integration inputResources: - name: releaseBundleResource |
A HelmDeploy step using Helm 2.
pipelines: - name: helmDeployPipeline steps: - name: helmDeployStep type: HelmDeploy configuration: helmVersion: 2 namespace: my-namespace releaseName: myHelmRelease integrations: - name: kubernetes_integration inputResources: - name: helmChartResource |
When you use the HelmDeploy native step in a pipeline, it performs the following functions in the background: