Artifacts don't copy to the second stage if the first task is NOT a VCS checkout task

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

A sample scenario: The first stage of a plan generates project dependencies to pass on to later stages. This successfully puts those files in a artifact called "A" which reads out of the "Test" directory on that stage. There are two other stages that need to consume that artifact. The first stage gets the artifact just fine. The second stage shows the "A" artifact run successfully (as per the log file) but the artifact doesn't actually show up in the work space/build directory.

Cause

This is an interference between artifact download and 'Force clean build'. Normally VCS Checkout task is the first one, then artifacts are downloaded. If the first task is not a "VCS Checkout task" and is a command task for example, Bamboo 'thinks' that it should download artifacts as the first thing. Then VCS Checkout task starts, which clears everything. The reason/fix for this behavior is maintaining backward compatibility with Jobs created before Multiple Repositories feature. We are in the process of having this work properly and fixed by providing customers better control over downloading artifacts.

Workaround

At the moment ONE of the following workarounds should resolve the problem:

Option 1) Moving the first task after the source checkout. 
Option 2) Turning  'Force clean build' off and use 'Clean working directory after each build' instead (This option can be found under each Job's Miscellaneous tab).

 

Last modified on Jun 13, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.