javascript - 关于 Jenkins 产生 NAN% 和空报告 URL 的引诱报告
问题描述
关于 Jenkins 生成 NAN% 和空报告 URL 的 Allure 报告。我在下面有一个管道,它正在生成关于 URL /null/ 的报告。在我的目录中添加 ${env.HOME} 之前它工作正常。但现在它不起作用
pipeline {
agent {
label {
label ""
customWorkspace "${env.HOME}/test"
}
}
tools {nodejs "node"}
stages {
stage('Checkout App') {
steps {
dir("${env.HOME}/app") {
echo "Building.."
sh 'git pull'
}
// build shopfloor app
dir("${env.HOME}/app") {
sh "/${env.HOME}/test/App.sh"
}
}
}
}
post('Publish Report') {
always {
script {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: 'target/allure_results']]
])
}
}
}
}
它说魅力报告生成于:
allure-results does not exists
Report successfully generated to /Users/john/.jenkins/null/test/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
解决方案
您正在dir("${env.HOME}/app"){...}
工作空间内创建一个目录。出于这个原因,诱惑没有找到结果,你可以这样做:
检查路径是否正确,但这将是一个示例:
results: [[path: '$WORKSPACE/${env.HOME}/app/target/allure_results']]
推荐阅读
- javascript - 按日期变量过滤 Graphql 结果
- java - 如何使用 java 配置 @CosmosDBtrigger?
- firebase - 如何根据登录的用户向 Firestore 添加一些数据,以及如何创建用户的个人资料?
- ruby-on-rails - 升级 Recurly Gem 时 billing_info 无效
- c# - 使用 CSharpCodeProvider 时在构建中嵌入依赖项
- macos - 如何在 .Net Core 控制台应用程序中引用 .Net Core 库
- html - 当相邻元素中存在相邻空格时,html中显示哪个空格?
- azure-web-app-service - 如何允许通过 VPN 的用户访问 Azure Web App
- android - 如何在上传到服务器之前在 webview 中压缩图像
- npm - NPM:如何在命令行中指定要发布的注册表?