fix(ci): retain service source workspaces

This commit is contained in:
2026-08-22 17:55:50 +08:00
parent 46e5c14b86
commit 1df87e5d17
2 changed files with 16 additions and 5 deletions
@@ -86,7 +86,18 @@ test('Java service images use the internal registry base image by default', () =
})
test('source workspaces are preserved for incremental Git fetches', () => {
const buildStage = pipeline.slice(
pipeline.indexOf("stage('构建并发布单服务')"),
pipeline.indexOf("stage('部署开发或测试环境')")
)
const directDeployStage = pipeline.slice(
pipeline.indexOf("stage('部署开发或测试环境')"),
pipeline.indexOf("stage('部署单个服务')")
)
assert.match(pipeline, /checkout scm/)
assert.doesNotMatch(buildStage, /cleanWs\(/)
assert.match(directDeployStage, /cleanWs\(/)
assert.equal((pipeline.match(/cleanWs\(/g) ?? []).length, 2)
assert.doesNotMatch(coordinatorPipeline, /cleanWs\(/)
})