The YAML schema for HelmPublish native step is as follows:
pipelines: - name: <string> steps: - name: <string> type: HelmPublish configuration: #inherits all the tags from bash; https://www.jfrog.com/confluence/display/JFROG/Bash helmVersion: <2 | 3> # optional, defaults to 2 chartPath: <path string> flags: <option string> # optional lint: <true | false> # optional, default false lintFlags: <string> # optional valueFilePaths: # optional - <path and filename> autoPublishBuildInfo: <true | false> # default false inputResources: - name: <GitRepo resource> # required outputResources: - name: <HelmChart resource> # required - name: <BuildInfo resource> # optional 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 HelmPublish
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 |
---|---|---|
inputResources | Must specify a GitRepo resource that contains the Helm chart. The step will package the chart into a versioned chart archive file. | Required |
outputResources | Must specify a HelmChart resource to update. The Must specify a BuildInfo resource when | Required May be required |
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. |
In addition, these tags can be defined to support the step's native operation:
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 |
chartPath | The path to the Helm chart in the GitRepo | Required |
flags | Command line options to pass to the | Optional |
lint | When true, performs a lint test to verify that the chart is well formed. Defaults to false. | Optional |
lintFlags | Options string to pass to the helm lint command. | Optional |
valueFilePaths | Specifies values YAML file(s) that will be used in the lint command helm lint command. All environment variable references in the specified file(s) will be automatically replaced with values of matching runtime environment variables. | Optional |
| When true, publishes build info with the Helm chart. Default is false. | 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 HelmPublish step.
A HelmPublish step using Helm 3 to publish to Artifactory.
pipelines: - name: helmPublishPipeline steps: - name: helmPublishStep type: HelmPublish configuration: helmVersion: 3 chartPath: "./myChart" inputResources: - name: gitRepoResource outputResources: - name: helmChartResource |
A HelmPublish step with lint, using a values.yaml file, added before publishing the Helm chart.
pipelines: - name: helmPublishPipeline steps: - name: helmPublishStep type: HelmPublish configuration: helmVersion: 3 chartPath: "./myChart" lint: true lintFlags: "--strict" valueFilePaths: - values.yaml inputResources: - name: gitRepoResource outputResources: - name: helmChartResource |
A HelmPublish step that publishes build info.
pipelines: - name: helmPublishPipeline steps: - name: helmPublishStep type: HelmPublish configuration: helmVersion: 3 chartPath: "./myChart" autoPublishBuildInfo: true inputResources: - name: gitRepoResource outputResources: - name: helmChartResource - name: buildInfoResource |
A HelmPublish step using Helm 2 to publish to Artifactory.
pipelines: - name: helmPublishPipeline steps: - name: helmPublishStep type: HelmPublish configuration: helmVersion: 2 chartPath: "./myChart" inputResources: - name: gitRepoResource outputResources: - name: helmChartResource |
When you use the HelmPublish native step in a pipeline, it performs the following functions in the background: