The HelmChart
resource maps to a specific chart in an Artifactory Helm Repository.
The HelmChart resource can be used in two native steps. The HelmPublish step takes a HelmChart as a required outputResource
. HelmPublish will create a new version of the chart, push it to Artifactory, and store the new version in the HelmChart resource. Then that HelmChart resource can be used as an inputResource
to the HelmDeploy native step. This will automatically download the HelmChart, and use the Helm CLI to deploy it to the configured cluster.
YAML Schema
resources: - name: <string> type: HelmChart configuration: sourceArtifactory: artifactoryIntegration repository: <string> chart: <string> version: <version string> pin: versionId: <number> version: <version string>
Tags
name
An alphanumeric string (underscores are permitted) that identifies the resource.
type
Must be HelmChart
for this resource type.
configuration
Specifies all configuration selections for the resource.
Tag | Description | Required/Optional |
---|---|---|
| The name of an Artifactory Integration | Required |
| The name of the Helm repository in Artifactory | Required |
| The name of the Helm chart | Required |
| A string that identifies the version number of the Helm chart | Required |
| This configuration can be used to pin the resource to a specific version. The pinned resource version will be used by the steps that reference this resource as an input and newer versions will be ignored. Users have two configuration options when selecting the HelmChart resource version to be pinned:
Or
Steps that use the resource as an output can still produce new versions. New versions will be visible for steps using the resource as an input as long as they are part of the same run of the step that created the version. When creating a new run, manual custom trigger can still be used to override the pinned version to a different one. | Optional |
Environment Variables
Whenever HelmChart
is used in a step, a set of environment variables is automatically made available that you can use in your step.
Environment Variable | Description |
---|---|
res_<resource_name>_name | Name of the resource |
res_<resource_name>_sourceArtifactory | The name of the Helm repository in Artifactory |
res_<resource_name>_chart | The name of the Helm chart |
res_<resource_name>_version | A string that identifies the version number of the Helm chart |
Example
This examples requires an Artifactory Integration and GitHub Integration.
The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.
resources: - name: git_repo type: GitRepo configuration: gitProvider: git_r path: jfrog/charts - name: helm_repo type: HelmChart configuration: sourceArtifactory: art_r repository: helm-local/ chart: test version: 1.0.0 pipelines: - name: test_helm configuration: nodePool: win_2019 steps: - name: helm_pub type: HelmPublish configuration: chartPath: ./simplehelm inputResources: - name: git_repo outputResources: - name: helm_repo # required execution: onStart: - write_output "executing step..." - Get-Variable | format-table onSuccess: - write_output "executing step..." - Get-Variable | format-table onFailure: - write_output "executing step..." - Get-Variable | format-table onComplete: #always - write_output "executing step..." - Get-Variable | format-table