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