Bamboo shared workspace

Hi,

Is there any way to share the workspace between stages in Bamboo?

Currently it's a big hurdle for us if we have to break our jobs into multiple stages

4 answers

3 votes

If your job is producing something interesting it can save it to be retrieved by other job in different stage or plan.

You have 3 options:

1) Define artifact and use download artifact task later to retrieve it - it will upload and download it later.

2) Manually publish artifact (like jar in maven repository etc.) and retrieve it later - similar to one but using something external instead of Bamboo 

3) If you can ensure that all agents run in same infrastructure/cloud (like using same disc storage or it's amazon image with shared storage mounted) you could avoid copying it by storing it there.

I was just about to mention artifact sharing instead you did an outstanding job of doing it for me. Artifact sharing is the answer to this. Artifacts literally can be what ever you want, you just have to define it in the interface. From there if you want to use that artifact in another place downstream, you have to share it. However note that one of your tasks in that job for that stage has to produce the define artifact in order to pass, otherwise because you shared it, if its not available at the end of the task execute your job will fail.

Marcin Oles Atlassian Team Nov 24, 2014

It would make sense to create an initial one-job stage which builds the project, and this job would create the artifact to be reused later. But please remember that artifacts are always preserved and in this scenario may take a lot of space in a short time. Consider enabling build expiry feature, which could expire entire builds or just artifacts under some configurable conditions (eg. preserve last X builds or preserve builds younger than X days).

1 vote
Marcin Oles Atlassian Team Nov 24, 2014

Unfortunately, there isn't.

Please remember that each job has it's own workspace and jobs can be executed in parallel within a stage - this would make it difficult to achieve shared workspaces between stages.

To sequentially execute activities within one workspace you should use tasks in a job.

A potential way of sharing directory content would be to create artifact definitions and download them in the next stage(s).

Regards,
Marcin 

This is disappointing, because in Atlassian's own guide "Bamboo Best Practice: Using Stages" suggests that we Checkout & Compile in one stage, and then run Unit Tests in the Next Stage, when clearly this is clearly impractical, as it would involve tarring up all sources and compiled test classes. With dozens of builds per hour, this really eats into disk space on even small projects.

The problem we have currently is that the integration tests a lot of time to execute and they are NOT required to run each time.

But at the same time we don't want the tasks to start from scratch for every single stage.

TeamCity allows builds to execute from one workspace and to bind all jobs / stages to a single agent.

 

You could us NFS or smb but perf will be an issue. Zipping the important bits and distributing to later steps via maven deps or shared artifacts seems the better option.

Another user somehow managed to share the target directory across the stages. (https://answers.atlassian.com/questions/30180).

But I am struggling to achieve that.

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,576 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