Fix ArgoCD outputs parse

Signed-off-by: Kevin Poirot <kevin@vazee.fr>
This commit is contained in:
Kevin Poirot 2021-09-10 09:40:46 +02:00 committed by Sam Alba
parent 0fe8b14e78
commit 083fee85a5

View File

@ -44,8 +44,7 @@ import (
op.#Exec & {
args: ["sh", "-c",
#"""
// FIXME JQ failed
argocd app get "$APPLICATION" --output json | jq '{health:.status.health.status,sync:.status.sync.status,namespace:.spec.destination.namespace,server:.spec.destination.server,urls:.status.summary.externalURLs|join(","),state:.status.operationState.message}' > /output.json
argocd app get "$APPLICATION" --output json | jq '{health:.status.health.status,sync:.status.sync.status,namespace:.spec.destination.namespace,server:.spec.destination.server,urls:(.status.summary.externalURLs//[]|join(",")),state:.status.operationState.message}' > /output.json
"""#,
]
env: {