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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,500,901
Community Members
 
Community Events
179
Community Groups

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.

Like # people like this

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.

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events