perf(ci): reuse Git workspaces across builds
This commit is contained in:
Vendored
-5
@@ -152,11 +152,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
|
||||||
always {
|
|
||||||
cleanWs(deleteDirs: true, notFailBuild: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('生产环境部署确认(仅 production 执行)') {
|
stage('生产环境部署确认(仅 production 执行)') {
|
||||||
|
|||||||
@@ -191,11 +191,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
|
||||||
always {
|
|
||||||
cleanWs(deleteDirs: true, notFailBuild: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('部署单个服务') {
|
stage('部署单个服务') {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ test('coordinator releases its builder while waiting for downstream jobs', () =>
|
|||||||
assert.match(pipeline, /stage\('确定构建范围'\) \{[\s\S]*?agent \{ label 'java-builder' \}/)
|
assert.match(pipeline, /stage\('确定构建范围'\) \{[\s\S]*?agent \{ label 'java-builder' \}/)
|
||||||
assert.match(pipeline, /agent \{ label 'java-builder' \}/)
|
assert.match(pipeline, /agent \{ label 'java-builder' \}/)
|
||||||
assert.doesNotMatch(pipeline, /agent any/)
|
assert.doesNotMatch(pipeline, /agent any/)
|
||||||
assert.doesNotMatch(pipeline, /post \{\s*always \{ cleanWs[\s\S]*?\}\s*\}\s*\}\s*$/)
|
assert.doesNotMatch(pipeline, /cleanWs\(/)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('AUTO detects database migrations without expanding them to all services', () => {
|
test('AUTO detects database migrations without expanding them to all services', () => {
|
||||||
|
|||||||
@@ -63,3 +63,9 @@ test('Java service images use the internal registry base image by default', () =
|
|||||||
assert.doesNotMatch(pipeline, /docker\.m\.daocloud\.io\/library\/eclipse-temurin/)
|
assert.doesNotMatch(pipeline, /docker\.m\.daocloud\.io\/library\/eclipse-temurin/)
|
||||||
assert.doesNotMatch(serviceDockerfile, /docker\.m\.daocloud\.io\/library\/eclipse-temurin/)
|
assert.doesNotMatch(serviceDockerfile, /docker\.m\.daocloud\.io\/library\/eclipse-temurin/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('source workspaces are preserved for incremental Git fetches', () => {
|
||||||
|
assert.match(pipeline, /checkout scm/)
|
||||||
|
assert.equal((pipeline.match(/cleanWs\(/g) ?? []).length, 2)
|
||||||
|
assert.doesNotMatch(coordinatorPipeline, /cleanWs\(/)
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user