Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo shared workspace

Oliver Pereira November 24, 2014

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
Pawel Skierczynski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2014

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.

Caley Goff November 24, 2014

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
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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 

Richard Cross February 16, 2015

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.

Like # people like this
0 votes
Oliver Pereira November 24, 2014

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.

0 votes
Oliver Pereira November 24, 2014

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.

 

Peter Kahn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events