fix(ci): retain service source workspaces
This commit is contained in:
+5
-5
@@ -154,11 +154,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
|
||||||
always {
|
|
||||||
cleanWs(deleteDirs: true, notFailBuild: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('部署开发或测试环境') {
|
stage('部署开发或测试环境') {
|
||||||
@@ -191,6 +186,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
cleanWs(deleteDirs: true, notFailBuild: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('部署单个服务') {
|
stage('部署单个服务') {
|
||||||
|
|||||||
@@ -65,7 +65,18 @@ test('Java service images use the internal registry base image by default', () =
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('source workspaces are preserved for incremental Git fetches', () => {
|
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.match(pipeline, /checkout scm/)
|
||||||
|
assert.doesNotMatch(buildStage, /cleanWs\(/)
|
||||||
|
assert.match(directDeployStage, /cleanWs\(/)
|
||||||
assert.equal((pipeline.match(/cleanWs\(/g) ?? []).length, 2)
|
assert.equal((pipeline.match(/cleanWs\(/g) ?? []).length, 2)
|
||||||
assert.doesNotMatch(coordinatorPipeline, /cleanWs\(/)
|
assert.doesNotMatch(coordinatorPipeline, /cleanWs\(/)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user