It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pulling libraries to fixed location to avoid per-branch duplication

I have several projects which use code from a larger set of libraries. These libraries are under source control.

The libraries repository contains all the libraries used by all my projects and contains multiple versions of multiple libraries. Each library/version pair lives in its own folder. Each of my projects identifies the specific library/version pairs it needs through the folder paths of the references in its project file.

I have been of course been able to configure my build plan to pull the libraries repository. So far so good. However, using the auto branch management feature, this setup means that the entire libraries repository is replicated for each branch in all projects.

Not funny. No, really, not funny...

What I would like to do is:

  • pull the libraries repository in each build plan
  • but pull it to a fixed location that is the same for all build plans
  • it doesn't have to be an absolute path
  • but it does need to be outside the working directory of the current build plan

Unfortunately the `Checkout Directory` of the `Source Code Checkout configuration` task doesn't allow me to specify either an absolute path or a relative one that goes "up" for one or more levels from the working dir. The hint text explicitly states "(Optional) Specify an alternative sub-directory to which the code will be checked out." And indeed, specifying something like `..\Library` gets punished with the message "Checkout to parent directory is forbidden".

What would be the easiest and least complicated way to achieve my goal?

3 answers

Have you by any chance managed to get this working? I was looking for the same solution

Nope. Gave up. Have had the same problem with other build server packages. It would seem that build server packages expect libraries to be installed on the server and not part of the build process. The idea has some merit, even for libraries that you develop yourself. But, while they indeed should have their own build process and release cycle, it does not necessarily follow that I should not be able to pull their source in the build of another piece of software.

I have the same problem - with a repository weighing in at around 2GB.
I'd like to simply "git checkout myBranch" and "git clean -fxd" instead of cloning every time (which should save a lot of time and disk space).  However I also like Bamboo's automatic trigger with new branches showing up.

I'd love to be able to put "..\SharedDirectory" in the "CheckoutDirectory" for the
"Source Code Checkout" task but it won't let me go out above the \JOB_KEY\ folder

I'm considering replacing the Source Code Checkout task with the two git commands above.
That way I can specify exact when/where/how to do the checkout. 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted yesterday in Off-topic

Miscellaneous Monday - Where it all started.

Happy Monday everyone! If you're anything like me, you tend to think a lot about what the future looks like. What are my kids up to in 15 years? Have we solved for climate change? How could TVs poss...

104 views 10 3
Join discussion

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