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

datree/datree-policy-check datree/datree-policy-check

This action runs the Datree CLI against given k8s configuration file/s in your repository, featuring full Helm and Kustomize support.

arguments

  • CLI_ARGUMENTS - Datree CLI arguments as specified here: https://hub.datree.io/setup/cli-arguments#flags
  • DATREE_TOKEN - Datree account token
  • HELM_ARGUMENTS - The Helm arguments to be used, if the path is a Helm chart
  • INPUT_PATH - File/s to be tested
  • IS_HELM_CHART - Is the desired path a Helm chart?
  • IS_KUSTOMIZATION - Is the desired path a Kustomization?
  • KUSTOMIZE_ARGUMENTS - The Kustomize arguments to be used, if the path is a Kustomization
  • WORKING_DIRECTORY - The directory to which the repository is cloned. It can be an explicit path in the container’s file system, or a variable that references another step. The default value is '/codefresh/volume/${{CF_REPO_NAME}}'
    datree-policy-check:
  title: Run Datree policy check
  type: datree/datree-policy-check
  arguments:
    DATREE_TOKEN: '${{DATREE_TOKEN}}'
    INPUT_PATH: fileName.yaml

  
    datree-policy-check:
  title: Run Datree policy check
  type: datree/datree-policy-check
  arguments:
    DATREE_TOKEN: '${{DATREE_TOKEN}}'
    INPUT_PATH: my/chart/directory
    IS_HELM_CHART: true
    HELM_ARGUMENTS: '--values values.yaml'

  
github.com
Hadar Cohen
Jun 12, 2022