Back to Argo Cd

Build Environment

docs/user-guide/build-environment.md

3.4.01.8 KB
Original Source

Build Environment

Custom tools, Helm, Jsonnet, and Kustomize support the following build env vars:

VariableDescription
ARGOCD_APP_NAMEThe name of the application.
ARGOCD_APP_NAMESPACEThe destination namespace of the application.
ARGOCD_APP_PROJECT_NAMEThe name of the project the application belongs to.
ARGOCD_APP_REVISIONThe resolved revision, e.g. f913b6cbf58aa5ae5ca1f8a2b149477aebcbd9d8.
ARGOCD_APP_REVISION_SHORTThe resolved short revision, e.g. f913b6c.
ARGOCD_APP_REVISION_SHORT_8The resolved short revision with length 8, e.g. f913b6cb.
ARGOCD_APP_SOURCE_PATHThe path of the app within the source repo.
ARGOCD_APP_SOURCE_REPO_URLThe source repo URL.
ARGOCD_APP_SOURCE_TARGET_REVISIONThe target revision from the spec, e.g. master.
KUBE_VERSIONThe semantic version of Kubernetes without trailing metadata.
KUBE_API_VERSIONSThe version of the Kubernetes API.

In case you don't want a variable to be interpolated, $ can be escaped via $$.

command:
  - sh
  - -c
  - |
    echo $$FOO