Skip to content

Commit

Permalink
Don't depend on jq
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet committed Nov 23, 2020
1 parent 41791a3 commit 3427d5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/app-diff.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash -e

ARGOCD_AUTH_TOKEN=$(jq -r '.ARGOCD_AUTH_TOKEN.value' terraform/outputs.json)
ARGOCD_AUTH_TOKEN=$(python3 -c "import sys, json; print(json.load(sys.stdin)['ARGOCD_AUTH_TOKEN']['value'])" < terraform/outputs.json)
export ARGOCD_AUTH_TOKEN

ARGOCD_OPTS="--plaintext --port-forward --port-forward-namespace argocd"
export ARGOCD_OPTS

KUBECONFIG_CONTENT=$(jq -r '.KUBECONFIG_CONTENT.value' terraform/outputs.json)
KUBECONFIG_CONTENT=$(python3 -c "import sys, json; print(json.load(sys.stdin)['KUBECONFIG_CONTENT']['value'])" < terraform/outputs.json)
export KUBECONFIG_CONTENT

export KUBECTL_EXTERNAL_DIFF="diff -u"
Expand Down
4 changes: 2 additions & 2 deletions scripts/wait-for-app-of-apps.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash -e

ARGOCD_AUTH_TOKEN=$(jq -r '.ARGOCD_AUTH_TOKEN.value' terraform/outputs.json)
ARGOCD_AUTH_TOKEN=$(python3 -c "import sys, json; print(json.load(sys.stdin)['ARGOCD_AUTH_TOKEN']['value'])" < terraform/outputs.json)
export ARGOCD_AUTH_TOKEN

ARGOCD_OPTS="--plaintext --port-forward --port-forward-namespace argocd"
export ARGOCD_OPTS

KUBECONFIG_CONTENT=$(jq -r '.KUBECONFIG_CONTENT.value' terraform/outputs.json)
KUBECONFIG_CONTENT=$(python3 -c "import sys, json; print(json.load(sys.stdin)['KUBECONFIG_CONTENT']['value'])" < terraform/outputs.json)
export KUBECONFIG_CONTENT

while ! KUBECONFIG=<(echo "$KUBECONFIG_CONTENT") argocd app wait apps --health --timeout 30
Expand Down

0 comments on commit 3427d5b

Please sign in to comment.