You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retry staged-image verify and tag promotion on transient registry errors
Problem 4 (intermittent Artifactory `Client.Timeout`) previously only
wrapped `docker login`. The deploy job's staged-image existence check
and the `docker buildx imagetools create` promotion still made
un-retried registry calls, so a transient timeout there failed the
deploy.
Add a shared `with_retries` helper (scripts/lib/retry.sh, 3 attempts /
15s backoff) and use it for:
- the verify-images check (accepts only HTTP 200; retries transient
000/5xx, still fails fast-enough on a genuinely-missing 404 after
attempts are exhausted),
- the CI promote step, and
- the local `oc-build-push.sh --promote` path (CI/local parity).
Docs updated to describe the broadened retry coverage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs-md/operations/AUTO_DEPLOY.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,14 @@ The workflow uses a per-ref concurrency group with `cancel-in-progress: true`. I
52
52
| Prod (`main`) |`bcgov-di-<sha12>`|`bcgov-di`|`oc set image .../<svc>=<registry>/<svc>:bcgov-di-<old-sha12>`| Keep 3 most recent SHA tags per image |
53
53
| Manual (`workflow_dispatch`) |`<branch-tag>-<sha12>`|`<branch-tag>`| Rebuild and redeploy | Keep 10 most recent SHA tags |
54
54
55
-
## Artifactory login retries
55
+
## Artifactory retries
56
56
57
-
The build and promote steps retry `docker login` up to three times with a 15-second backoff (`scripts/lib/artifactory-login.sh`) to handle intermittent `Client.Timeout exceeded` errors against the registry.
57
+
To handle intermittent `Client.Timeout exceeded` errors against the registry, registry operations retry up to three times with a 15-second backoff:
58
+
59
+
-`docker login` in the build and promote steps (`scripts/lib/artifactory-login.sh`).
60
+
- The deploy job's staged-image existence check and the `docker buildx imagetools create` promotion, via a shared `with_retries` helper (`scripts/lib/retry.sh`). The existence check only accepts HTTP 200, so a transient timeout (`000`) or `5xx` is retried while a genuinely-missing image still fails after the attempts are exhausted.
61
+
62
+
All Artifactory REST/registry `curl` calls additionally use `--connect-timeout 30 --max-time 120`.
All Artifactory API calls use `--connect-timeout 30 --max-time 120`. Docker login retries up to 3 times via `scripts/lib/artifactory-login.sh`.
132
+
All Artifactory API calls use `--connect-timeout 30 --max-time 120`. Docker login retries up to 3 times via `scripts/lib/artifactory-login.sh`, and the CI staged-image existence check and `imagetools create` tag promotion retry via `scripts/lib/retry.sh` (`with_retries`).
0 commit comments