2019-10-21 23:54:23 +00:00
# Jsonnet
2020-07-13 21:18:21 +00:00
Any file matching `*.jsonnet` in a directory app is treated as a Jsonnet file. ArgoCD evaluates the Jsonnet and is able to parse a generated object or array.
2019-10-21 23:54:23 +00:00
## Build Environment
2019-11-21 22:37:45 +00:00
> v1.4
2019-11-06 22:36:09 +00:00
2019-10-21 23:54:23 +00:00
Jsonnet apps have access to the [standard build environment ](build-environment.md ) via substitution into *TLAs* and *external variables* .
2020-10-20 01:21:06 +00:00
It is also possible to add a shared library (e.g. `vendor` folder) relative to the repository root.
2019-10-21 23:54:23 +00:00
E.g. via the CLI:
```bash
argocd app create APPNAME \
--jsonnet-ext-str 'app=${ARGOCD_APP_NAME}' \
2020-07-27 18:16:22 +00:00
--jsonnet-tla-str 'ns=${ARGOCD_APP_NAMESPACE}' \
2020-07-13 21:18:21 +00:00
--jsonnet-libs 'vendor'
2019-10-21 23:54:23 +00:00
```
Or by declarative syntax:
```yaml
directory:
jsonnet:
extVars:
- name: app
value: $ARGOCD_APP_NAME
tlas:
- name: ns
value: $ARGOCD_APP_NAMESPACE
2020-07-13 21:18:21 +00:00
libs:
- vendor
```