Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
40K

helmfile helmfile

Use helmfile from Codefresh pipeline

arguments

  • ALLOW_NO_MATCHING_RELEASE - Do not exit with an error code if the provided selector has no matching releases.
  • APPLY_PS - String of command options and arguments for, helmfile apply - apply all resources from state file only when there are changes
  • CHARTS_PS - String of command options and arguments for, helmfile charts - DEPRECATED: sync releases from state file (helm upgrade --install)
  • COMMANDS - helmfle commands, executed in order provided
  • DELETE_PS - String of command options and arguments for, helmfile delete - DEPRECATED: delete releases from state file (helm delete)
  • DEPS_PS - String of command options and arguments for, helmfile deps - update charts based on the contents of requirements.yaml
  • DESTROY_PS - String of command options and arguments for, helmfile destroy - deletes and then purges releases
  • DIFF_PS - String of command options and arguments for, helmfile diff - diff releases from state file against env (helm diff)
  • ENVIRONMENT - specify the environment name. defaults to default
  • FILE - load config from file or directory. defaults to helmfile.yaml or `helmfile.d`(means `helmfile.d/*.yaml`) in this preference
  • HELMFILE_VERSION - Version of helmfile binary
  • HELM_BINARY - path to helm binary
  • HELM_VERSION - Version of helm binary
  • HELP - show help
  • INTERACTIVE - Request confirmation before attempting to modify clusters
  • KUBE_CONTEXT - Set kubectl context. Uses current context by default
  • LINT_PS - String of command options and arguments for, helmfile lint - lint charts from state file (helm lint)
  • LOG_LEVEL - Set log level, default info
  • NAMESPACE - Set namespace. Uses the namespace set in the context by default, and is available in templates as {{ .Namespace }}
  • NO_COLOR - Output without color
  • QUIET - Silence output. Equivalent to log-level warn
  • REPOS_PS - String of command options and arguments for, helmfile repos - sync repositories from state file (helm repo add && helm repo update)
  • SELECTOR - Only run using the releases that match labels. Labels can take the form of foo=bar or foo!=bar. A release must match all labels in a group in order to be used. Multiple groups can be specified at once. --selector tier=frontend,tier!=proxy --selector tier=backend. Will match all frontend, non-proxy releases AND all backend releases. The name of a release can be used as a label. --selector name=myrelease
  • STATE_VALUES_FILE - specify state values in a YAML file
  • STATE_VALUES_SET - set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
  • STATUS_PS - String of command options and arguments for, helmfile status - retrieve status of releases in state file
  • SYNC_PS - String of command options and arguments for, helmfile sync - sync all resources from state file (repos, releases and chart deps)
  • TEMPLATE_PS - String of command options and arguments for, helmfile template - template releases from state file against env (helm template)
  • TEST_PS - String of command options and arguments for, helmfile test - test releases from state file (helm test)
  • VERSION - print the version
  • WORKING_DIRECTORY
    deploy:
  type: helmfile
  arguments:
    WORKING_DIRECTORY: '/codefresh/volume/${{CF_REPO_NAME}}'
    COMMANDS: diff
    ENVIRONMENT: development
    KUBE_CONTEXT: dev_cluster

  
github.com
Dustin Van Buskirk
Jan 19, 2023