[英]Jenkins Artifactory Plugin - Fail build if upload fails
When configuring the Artifactory Plugin for "Generic-Artifactory" integration, someone changed the artifact name without updating the Jenkins2 plan and the upload no longer worked. 在为“通用-Artifactory”集成配置Artifactory插件时,有人更改了工件名称而没有更新Jenkins2计划,因此上载不再起作用。 Unfortunately, the Jenkins build never failed or warned us. 不幸的是,詹金斯大厦从未失败或警告过我们。
I'm sure there's an obvious answer here somewhere, but I'm missing it. 我敢肯定这里有一个明显的答案,但我想不起来了。 I don't want to write a script that checks for the artifact and exits if it's not there, although it would work. 我不想编写一个脚本来检查工件并在不存在的情况下退出,尽管它可以工作。 I'm looking for the right way to do this. 我正在寻找正确的方法来做到这一点。
https://www.jfrog.com/confluence/display/RTF/Using+File+Specs https://www.jfrog.com/confluence/display/RTF/Using+File+Specs
{
"files": [
{
"pattern": "$WORKSPACE/foobar.jar",
"target": "libs-release-local/com/mycompany/foo-1.1.jar"
}
]
}
Your desired functionality is the fail-no-op flag, which will fail the build if no files were affected (uploaded/downloaded) during the process. 您需要的功能是fail-no-op标志,如果在此过程中没有文件受到影响(上载/下载),它将使构建失败。
The fail-no-op flag is only available in pipeline jobs, both in declarative and scripted syntax. fail-op-flag仅在管道作业中可用,包括声明性和脚本化语法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.