Jenkins 通过sh导航到.jar
对jenkins来说非常陌生,因此我很抱歉,在运行我的jenkins工作时得到以下信息: 现在mvn清洁安装 [管道] 回声现在存档。。。 [管道] 执行成功发布条件时出现archiveArtifacts错误: hudson.AbortException:未找到与文件模式匹配的工件 “***/target/*.jar”。配置错误?在 perform(ArtifactArchiver.java:253)位于 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) 在 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) 在 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) 位于hudson.security.ACL.impersonate(ACL.java:290) org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) 位于java.util.concurrent.Executors$RunnableAdapter.call(未知 在java.util.concurrent.FutureTask.run(未知源代码)处 位于的java.util.concurrent.ThreadPoolExecutor.runWorker(未知源) java.util.concurrent.ThreadPoolExecutor$Worker.run(未知源代码)位于 java.lang.Thread.run(未知源) 存档工件“/target/*.jar”与任何内容都不匹配:“” 存在但不是“**/target/*.jar”[管道]} 我现在正试图让它简单地构建并找到.jar,然后我将在部署阶段查看EC2的scp 谢谢Jenkins 通过sh导航到.jar,jenkins,Jenkins,对jenkins来说非常陌生,因此我很抱歉,在运行我的jenkins工作时得到以下信息: 现在mvn清洁安装 [管道] 回声现在存档。。。 [管道] 执行成功发布条件时出现archiveArtifacts错误: hudson.AbortException:未找到与文件模式匹配的工件 “***/target/*.jar”。配置错误?在 perform(ArtifactArchiver.java:253)位于 org.jenkinsci.plugins.workflow.steps.CoreStep
Git:生成后,您是否确认文件是否确实存在于您的工作区中
def fileExists = fileExists '**/target/surefire-reports/TEST-*.xml'
if (fileExists) {
junit fileExists
} else {
echo 'Sorry file does not exist have you skipped test ???'
}
如果需要,可以在代码中添加此项,检查文件是否存在
p.S.尝试提及工作区的绝对路径,看看是否有效
希望有帮助:)