Files
argo-cd/cmpserver/plugin/testdata/kustomize/config/plugin.yaml
Michael Crenshaw 95f9196317 fix: pass env when getting param announcement (#11812) (#11815)
* fix: pass env when getting param announcement (#11812)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* use same method as other methods

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* better tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* make sure env var tests are meaningful

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-03-22 14:55:09 -04:00

34 lines
729 B
YAML

apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: kustomize
spec:
version: v1.0
init:
command: [sh, -c]
args:
- |
kustomize version
generate:
command: [sh, -c]
args:
- |
kustomize build
discover:
find:
command: [sh, -c, find . -name kustomization.yaml]
glob: "**/kustomization.yaml"
parameters:
static:
- name: test-param
string: test-value
dynamic:
command: [sh, -c]
args:
- |
# Make sure env vars are making it to the plugin.
if [ -z "$MUST_BE_SET" ]; then
exit 1
fi
echo "[{\"name\": \"dynamic-test-param\", \"string\": \"$MUST_BE_SET\"}]"