fix(ci): retain configured image repository defaults

This commit is contained in:
2026-10-21 15:28:44 +08:00
parent 6fe632f28e
commit 94595c810b
3 changed files with 6 additions and 3 deletions
@@ -17,7 +17,8 @@ const serviceCompose = (await readFile(new URL('../deploy/docker-compose.yml', i
test('both pipelines reject the placeholder registry from failed build 662 before Maven or Docker', () => {
for (const source of [coordinatorPipeline, pipeline]) {
assert.match(source, /string\(name: 'IMAGE_REPOSITORY', defaultValue: ''/)
assert.match(source, /string\(name: 'IMAGE_REPOSITORY', defaultValue: params\.IMAGE_REPOSITORY \?: ''/,
'declarative parameter refresh must retain this job\'s configured registry instead of resetting it')
const guard = source.match(/(?:requestedRepository|imageRepository)\.tokenize\('\/'\)\[0\] ==~ \/\(\?i\)([^\n]+)\//)
assert.ok(guard, 'registry host must reject reserved example domains')
const reservedHost = new RegExp(`^(?:${guard[1]})$`, 'i')