DotCi icon indicating copy to clipboard operation
DotCi copied to clipboard

Don't mark a build failed if all subbuilds pass, but artifacts not found

Open alexkogon opened this issue 11 years ago • 1 comments

We have a build with the following .ci.yml configuration:

plugins: - artifacts: '/screenshots//.'

to archive screenshots from failed browser tests.

However, if the browser tests pass, the screenshots directory is not present, and we would just like to do nothing, but DotCI treats this as a build failure, as shown below. We would like this to not be marked as a failure, minimally as an option in the .ci.yml (I don't know if there is any case where you would want it to fail if the files are not present, but as long as we can turn that off we're happy)

Triggering script=firefox-goodsbrowse-tests Triggering script=chrome-goodsbrowse-tests Triggering script=safari-goodsbrowse-tests Triggering script=iexplorer8-goodsbrowse-tests Triggering script=iexplorer9-goodsbrowse-tests Triggering script=iexplorer10-goodsbrowse-tests Triggering script=chrome-cart-tests Run script=firefox-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=chrome-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=safari-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=iexplorer8-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=iexplorer9-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=iexplorer10-goodsbrowse-tests finished with : SUCCESS Copying files :/screenshots//. Run script=chrome-cart-tests finished with : SUCCESS Copying files :/screenshots//. Archiving artifacts ERROR: No artifacts found that match the file pattern "/screenshots//.". Configuration error? ERROR: ‘/screenshots//.’ doesn’t match anything: ‘’ exists but not ‘/screenshots//.’ Sending email notifications setting commit status on Github for XXXX Sending email notifications Sending email to: [email protected] Finished: FAILURE

alexkogon avatar Jul 24 '14 08:07 alexkogon

We're seeing something similar on homepage.

Run script=client-server finished with : SUCCESS
Copying files :test/log/
Run script=integration-group1 finished with : SUCCESS
Copying files :test/log/
Run script=integration-group2 finished with : SUCCESS
Copying files :test/log/
Run script=integration-group3 finished with : SUCCESS
Copying files :test/log/
Failed to copy /home/builduser/workspace/homepage/homepage/script=integration-group3/test/log/testium/proxy.log to /home/builduser/workspace/homepage/homepage/test/log/testium/proxy.log
java.io.IOException: Failed to copy /home/builduser/workspace/homepage/homepage/script=integration-group3/test/log/testium/proxy.log to /home/builduser/workspace/homepage/homepage/test/log/testium/proxy.log
    at hudson.FilePath.copyTo(FilePath.java:1800)
    at com.groupon.jenkins.dynamic.buildconfiguration.plugins.DotCiPluginAdapter.copyFiles(DotCiPluginAdapter.java:103)
    at com.groupon.jenkins.dynamic.buildconfiguration.plugins.ArtifactsPluginAdapter.runFinished(ArtifactsPluginAdapter.java:58)
    at com.groupon.jenkins.dynamic.build.execution.SubBuildScheduler.runSubBuilds(SubBuildScheduler.java:71)
    at com.groupon.jenkins.dynamic.build.execution.DynamicMultiConfigBuildRunner.runBuild(DynamicMultiConfigBuildRunner.java:56)
    at com.groupon.jenkins.dynamic.build.execution.DynamicBuildExection.doRun(DynamicBuildExection.java:71)
    at com.groupon.jenkins.dynamic.build.DynamicBuild$DynamicRunExecution.doRun(DynamicBuild.java:189)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1710)
    at com.groupon.jenkins.dynamic.build.DynamicBuild.run(DynamicBuild.java:88)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:234)
Caused by: java.io.IOException: remote file operation failed: /home/builduser/workspace/homepage/homepage/script=integration-group3/test/log/testium/proxy.log at hudson.remoting.Channel@200aeee9:distbuild31-vm2.snc1
    at hudson.FilePath.act(FilePath.java:916)
    at hudson.FilePath.act(FilePath.java:893)
    at hudson.FilePath.copyTo(FilePath.java:1821)
    at hudson.FilePath.copyTo(FilePath.java:1795)
    ... 11 more
Caused by: java.io.FileNotFoundException: /home/builduser/workspace/homepage/homepage/script=integration-group3/test/log/testium/proxy.log (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at hudson.FilePath$37.invoke(FilePath.java:1826)
    at hudson.FilePath$37.invoke(FilePath.java:1821)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:328)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Build was aborted
setting commit status on Github for https://github.groupondev.com/homepage/homepage/commit/6344721c694cc1e1556cd51274e233c74249eae7
Finished: ABORTED

jcfrancisco avatar Jul 25 '14 16:07 jcfrancisco