Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
Plugin's icon
13

helm-promote helm-promote

Promote images and dependencies between helm charts in different directories and bump the chart version.

arguments

  • BUMP_VERSION - If we should bump the chart's version. Default is true
  • BUMP_VERSION_TYPE - The part of the version to bump (major|minor|patch). By default will bump 'patch'
  • FROM_VALUES_YAML - The values YAML name to use for the 'from' chart. Will use 'VALUES_YAML' by default
  • IMAGE_FORMAT - The format to search and replaces images with in the values yaml, replaces '{{IMAGE}}' with a PROMOTE_IMAGE at runtime. By default will use '{{IMAGE}}.image.tag'
  • PROMOTE_FROM - The directory of the helm chart to get values from
  • PROMOTE_IMAGES - A comma-seperated list of images keys to search for and replace between values.yamls
  • PROMOTE_SUBCHARTS - The dependency (sub)charts tags to search for and replace between Chart.yamls. Use this when your subchart name does not match your image name. By default will be the same as PROMOTE_IMAGES
  • PROMOTE_TO - The directory of the helm chart to insert values in to
  • TO_VALUES_YAML - The values YAML name to use for the 'to' chart. Will use 'VALUES_YAML' by default
  • VALUES_YAML - The value YAML to look for in the PROMOTE_TO and PROMOTE_FROM. Will use 'values.yaml' by default
    PromoteHelmChart:
  title: Promote helm chart from dev to test
  type: helm-promote
  working_directory: '${{Clone}}'
  arguments:
    PROMOTE_FROM: dev
    PROMOTE_TO: test
    PROMOTE_IMAGES: 'frontend,middleware,backend'

  
    PromoteHelmChart:
  title: Promote between values yamls in the same chart
  type: helm-promote
  working_directory: '${{Clone}}'
  arguments:
    PROMOTE_FROM: chart
    PROMOTE_TO: chart
    FROM_VALUES_YAML: values-dev.yaml
    TO_VALUES_YAML: values-test.yaml
    PROMOTE_IMAGES: web-ui
    IMAGE_FORMAT: 'path.to.{{IMAGE}}.tag'

  
github.com
Jesse Antoszyk
Sep 9, 2021