优化
This commit is contained in:
@@ -4,6 +4,8 @@ import test from 'node:test'
|
||||
|
||||
const pipeline = (await readFile(new URL('../Jenkinsfile', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
const servicePipeline = (await readFile(new URL('../Jenkinsfile.service', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
|
||||
test('coordinator releases its builder while waiting for downstream jobs', () => {
|
||||
assert.match(pipeline, /pipeline \{[\s\S]*?agent none/)
|
||||
@@ -68,3 +70,14 @@ test('production deploy uses DEPLOY as the single explicit release switch', () =
|
||||
assert.doesNotMatch(pipeline, /input message:/)
|
||||
assert.doesNotMatch(pipeline, /\u786e\u8ba4\u90e8\u7f72/)
|
||||
})
|
||||
|
||||
test('production deploy reports one aggregated result to WeCom', () => {
|
||||
assert.match(pipeline, /credentialsId: 'wecom-prod-webhook'/)
|
||||
assert.match(pipeline, /node\('java-builder'\) \{[\s\S]*?WECOM_WEBHOOK/)
|
||||
assert.match(pipeline, /env\.JOB_BASE_NAME == 'backend-java-prod' && params\.DEPLOY/)
|
||||
assert.match(pipeline, /unstable \{[\s\S]*?'\u90e8\u7f72\u90e8\u5206\u5931\u8d25'/)
|
||||
assert.match(pipeline, /failure \{[\s\S]*?'\u90e8\u7f72\u5931\u8d25'/)
|
||||
assert.match(pipeline, /aborted \{[\s\S]*?'\u90e8\u7f72\u5df2\u53d6\u6d88'/)
|
||||
assert.match(pipeline, /\u4f01\u4e1a\u5fae\u4fe1\u901a\u77e5\u5931\u8d25\uff0c\u4e0d\u5f71\u54cd\u539f\u6784\u5efa\u7ed3\u679c/)
|
||||
assert.doesNotMatch(servicePipeline, /wecom-prod-webhook|sendProductionWeComNotification/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user