我想存档我的程序的工件,但是当构建失败时,他不会保存工件.为什么是这样?
因为我只想在作业失败时读取工件!
感谢您的答复!
-
总是当工作失败时,我没有得到工件.我在非常小的工作中测试它:
空批处理文件+工件文件,结果:Job Succesfull,Artifact:succesfull
在批处理文件中退出1 +工件文件,结果:作业失败,工件:没有做任何事情
该作业的config.xml文件:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers class="vector"/>
<concurrentBuild>false</concurrentBuild>
<customWorkspace>C:\test\</customWorkspace>
<builders>
<hudson.tasks.BatchFile>
<command>exit 1</command>
</hudson.tasks.BatchFile>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>tomcat\logs\tomcat.log</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers/>
</project>
Run Code Online (Sandbox Code Playgroud)