From a9b05d6eaea0209c4a197852b09cca9c85f1feaf Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Mon, 4 May 2026 04:26:19 +0000 Subject: [PATCH] fix: use cached external secrets oci artifact --- .gitea/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d2f3a10..08c3762 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -437,7 +437,10 @@ jobs: wait_for_resource flux-system "ocirepository.source.toolkit.fluxcd.io/${oci_name}" 600 reconcile_helmrelease "${release_name}" 300 - if ! kubectl -n flux-system wait --for=condition=Ready "ocirepository/${oci_name}" --timeout="${oci_timeout}"; then + artifact_storage="$(kubectl -n flux-system get "ocirepository/${oci_name}" -o jsonpath='{.status.conditions[?(@.type=="ArtifactInStorage")].status}' 2>/dev/null || true)" + if [ "${artifact_storage}" = "True" ]; then + echo "OCIRepository ${oci_name} has a cached artifact; continuing without waiting for current registry readiness" >&2 + elif ! kubectl -n flux-system wait --for=condition=Ready "ocirepository/${oci_name}" --timeout="${oci_timeout}"; then artifact_storage="$(kubectl -n flux-system get "ocirepository/${oci_name}" -o jsonpath='{.status.conditions[?(@.type=="ArtifactInStorage")].status}' 2>/dev/null || true)" if [ "${artifact_storage}" = "True" ]; then echo "OCIRepository ${oci_name} is not currently Ready; continuing with cached artifact" >&2