Fix caching issue on argoCD package

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-09-10 15:37:37 +02:00
committed by Sam Alba
parent 05b165bcc8
commit ef112e21ec
5 changed files with 41 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ import (
// Destination namespace
namespace: dagger.#Input & {*"default" | string}
ctr: os.#Container & {
os.#Container & {
image: #CLI & {
"config": config
}
@@ -36,6 +36,7 @@ import (
--dest-server "$APP_SERVER" \
--dest-namespace "$APP_NAMESPACE"
"""#
always: true
env: {
APP_NAME: name
APP_REPO: repo

View File

@@ -48,6 +48,7 @@ import (
"""#,
]
env: APPLICATION: name
always: true
},
op.#Export & {

View File

@@ -16,7 +16,7 @@ import (
// Wait the application to sync correctly
wait: dagger.#Input & {*false | bool}
ctr: os.#Container & {
os.#Container & {
image: #CLI & {
"config": config
}
@@ -27,6 +27,7 @@ import (
argocd app wait "$APPLICATION"
fi
"""#
always: true
env: APPLICATION: application
if wait {
env: WAIT_FLAG: "wait"

View File

@@ -222,6 +222,9 @@ setup() {
dagger -e argocd-infra input text TestKubeconfig -f "$HOME"/.kube/config
dagger -e argocd-infra up
# Wait for infra to be ready
kubectl -n argocd wait --for=condition=available deployment -l "app.kubernetes.io/part-of=argocd" --timeout=45s
# Forward port
# We need to kill subprocess to avoid infinity loop
kubectl port-forward svc/argocd-server -n argocd 8080:443 >/dev/null 2>/dev/null &