Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
Query CF Helm Chart Repo query-cf-helm-repo
Query the Codefresh Helm Chart Repository for a version of a chart. Outputs whether or or not ('true' or 'false') the specified chart version was found in a variable called CHART_VER_FOUND. Can optionally throw an error for either result. Requires importing the CF_HELM_DEFAULT shared configuration into the pipeline's variables.
arguments
returns
check_repo_for_chart:
title: Check if a chart verion is already in the repo
type: query-cf-helm-repo
arguments:
CHART_NAME: my-chart
CHART_VERSION: 0.0.1
check_repo_for_chart:
title: Fail pipeline if chart is aleady in repo
type: query-cf-helm-repo
arguments:
CHART_NAME: my-chart
CHART_VERSION: 0.0.1
FAIL_WHEN: 'true'