Commit b63cb018 authored by liguangyu06's avatar liguangyu06
Browse files

Skip the Allure Pipeline step so report email still sends without the plugin.

parent 41e01135
...@@ -205,26 +205,17 @@ pipeline { ...@@ -205,26 +205,17 @@ pipeline {
echo "跳过 HTML 报告:${err}" echo "跳过 HTML 报告:${err}"
} }
try { try {
if (fileExists('reports/latest/allure-results')) { if (fileExists('reports/latest/allure-report/index.html')) {
try { publishHTML([
allure includeProperties: false, jdk: '', results: [[path: 'reports/latest/allure-results']] allowMissing: true,
} catch (err) { alwaysLinkToLastBuild: true,
echo "Allure 插件不可用,已保留 reports/latest/allure-report:${err}" keepAll: true,
if (fileExists('reports/latest/allure-report/index.html')) { reportDir: 'reports/latest/allure-report',
try { reportFiles: 'index.html',
publishHTML([ reportName: 'Allure Report'
allowMissing: true, ])
alwaysLinkToLastBuild: true, } else {
keepAll: true, echo '未生成 Allure HTML(节点未装 Java/Allure 插件),以 Playwright 报告为准。'
reportDir: 'reports/latest/allure-report',
reportFiles: 'index.html',
reportName: 'Allure Report'
])
} catch (ignored) {
echo "跳过 Allure HTML:${ignored}"
}
}
}
} }
} catch (err) { } catch (err) {
echo "跳过 Allure:${err}" echo "跳过 Allure:${err}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment