Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-21636

Add the option to retrieve artifacts from failed builds


    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Current behavior

      • Currently, Artifacts are not uploaded for failed steps. 


      • One possible solution could be to provide an option per registered artifact, in which we can decide to have them despite the result, or only if failed or succeeded. The option "only on success" could then be the default option, as this is the behavior as it is today.

      Business case:

      We use 'cypress' to run our tests, which creates screen-recordings of tests that we want to access if the tests fail. Furthermore, we use the same pipeline to automatically upload the build to our staging environment, which should not happen if the tests fail. Also, a red test indicates that there's something wrong, so I'd like it red (to use bitbuckets notifications for failed tests) but still have access to the artifacts.


      Bitbucket Pipelines achieves the default behavior of exiting on the first error by prepending your script with the "set -e” bash command. You can "undo” this at any point in your script using the command "set +e”. If you want all the commands in your script to execute regardless of errors then put "set +e” at the top of your script. If you just want to ignore the error for one particular command then put "set +e” before that command and "set -e” after it.

      Once the scripts are forcefully successful with the help of the method mentioned above, the artifacts upload part will be executed and they will be available for download later.

            57465700c4e1 Edmund Munday
            2109285dcbb0 Caroline R
            106 Vote for this issue
            32 Start watching this issue