Commit eda022f
authored
fix: correct repository extraction for mirror registries (#14)
## Summary
Fixes the repository extraction logic that was incorrectly removing too
much from mirror registry paths.
## Problem
The previous logic performed two extractions:
1. `mirror.gcr.io/dotcms/dotcms` → `dotcms/dotcms` (remove registry)
2. `dotcms/dotcms` → `dotcms` (remove one more level)
This caused validation failures because `dotcms` does not match the
allowed repository `dotcms/dotcms`.
## Solution
Changed to a single extraction that removes only the registry domain
prefix, preserving the org/repo structure.
### Test Results
- ✅ `mirror.gcr.io/dotcms/dotcms` → `dotcms/dotcms`
- ✅ `docker.io/dotcms/dotcms` → `dotcms/dotcms`
- ✅ `dotcms/dotcms` → `dotcms/dotcms`
## Impact
This fix enables proper validation of images from mirror registries like
`mirror.gcr.io`.
## Related
- Blocks: dotCMS/deutschebank-infrastructure#360
- Follows: #131 parent b098409 commit eda022f
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
436 | 436 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | 437 | | |
442 | 438 | | |
443 | 439 | | |
| |||
0 commit comments