Bamboo build error. Unable to publish artifact, the source directory does not exist.

I am trying to clean re-install bamboo into the Ubuntu server. However this time my build is failing and these are the logs:

04-Jan-2018 18:39:37 Finished task 'zip the source files' with result: Success
04-Jan-2018 18:39:37 Running post build plugin 'NCover Results Collector'
04-Jan-2018 18:39:37 Running post build plugin 'Artifact Copier'
04-Jan-2018 18:39:37 Publishing an artifact: build.zip
04-Jan-2018 18:39:37 Unable to publish artifact [build.zip]: the source directory /home/bamboo/bamboo-home/xml-data/build-dir/SHOP-REL-BS/builds/build.zip does not exist.
04-Jan-2018 18:39:37 The artifact is required for down stream Stages and Jobs, build will now fail.
04-Jan-2018 18:39:37 The artifact hasn't been successfully published after 683.5 μs

 The log shows that the path for artifact is invalid but I can make sure that the path exist. Pelase see the screenshot:

Screen Shot 2018-01-05 at 09.50.59.png

 

Any help on this is much appreciated.

 

2 answers

1 accepted

I have now solved this issue.

 

The problem was in the artifact defination:

Wrong definition:

Name : build.zip

location : builds/build.zip

copy pattern : build.zip

 

Correct definition:

Name : build.zip

location : builds

copy pattern : build.zip

Hi Rabi,

Please check and make sure the user running Bamboo has access to the zip file in that directory.

Hi Edwin,

Thank you for your reply.

Please see the permissions for the build.zip artifact.

Screen Shot 2018-01-05 at 10.56.29.png

As the user and group is bamboo, wouldn't bamboo have access to the file?

Yes, bamboo should have access. Try adding a task to clean the working directory. 

So the same configuration is working on another server but not after you moved it?

Cleaned the working directory manually before running the plan. Still no luck.

 

I have done following:

Added a task to see who the user is, shows bamboo as expected.

Added a task to list files, the build.zip is there as expected.

Added a task to give permission 777 to build.zip.

05-Jan-2018 12:24:35 total 285264
05-Jan-2018 12:24:35 -rwxrwxrwx 1 bamboo bamboo 292109077 Jan 5 12:24 build.zip
05-Jan-2018 12:24:35 bamboo
05-Jan-2018 12:24:35 Unable to publish artifact [build.zip]: the source directory /home/bamboo/bamboo-home/xml-data/build-dir/SHOP-REL-BS/builds/build.zip does not exist.
05-Jan-2018 12:24:35 The artifact is required for down stream Stages and Jobs, build will now fail.

 

Previously installed bamboo on the same server with  internal HSQL database but now decided to move to postgresql so re-installed the bamboo.

Used the same exact scripts and settings.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,584 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you