Bamboo artifacts sharing and updated shared artifacts if some packages get modified

I need to setup a build plan in Bamboo for an repository in which check-in happens very rarely. So currently when the build happen it the packages in that repository get re-build which consume lot of time. So we are thinking to optimize the same. Below is the use case which we want to address.

  1. At the very first build of the plan we want to build the packages from that repository. So that it build the RPM's packages with some version format say name-a.b.c.d.rpm.
  2. Now there could be the case that in particular folder some file get changed. So we want that bamboo should identify that and build the package for that directory. If this is not possible I have thought for this to be done through build script.
  3. Now as above step will result into a limited package build, we want to update the artifacts build as part of the step 1 and step 3. So say some package in step 1 have version as name-a.b.c.d.rpm and some packages in step 3 will have version as name-a.b.c.e.rpm So we want to replace the package for which this version got changed.
  4. These artifacts need to be shared across build till we have step 2 and 3 occurring.

So any thoughts how we can  achieve the same?

2 answers

1 vote

Bamboo can't detect what part of your source tree has changed. If your "particular folder" is an independent module/project - why not put it into a separate repository and create separate plan for it?

I can write an script which will check for modifications for such things. But I am not getting how to merge the artifacts and publish it for later builds.

What programming language/technologies your project uses?

Let me provide more information that what I am trying to achieve. I have a repository which contain audio files for different languages. Below is sample layout /test |---en |---enu |---fr Now some time there will be check-in in some of the directories or may be in all directories. So the build take longer time to build. So to avoid that I can write an script which can query to repository and find which directory has modification and then can make package for those directories. But here come another issue as the version is maintained using bamboo build plan in form x.x.x.<build no>.rpm. Now we want to achieve below stuff 1. Using the build script we build selected packages which has different version say for example en- 2. Now initially we would have packages like en-, enu- and fr- So we want to have mixed artifacts from the previous build and this build so the publish artifacts like below en-, enu-, fr- Any thoughts how we can achieve it. As the build host are CentOs one we can have any language support to build the framework.

Bamboo can't merge artifacts from different builds. You'd have to create some additional utility that would scan Bamboo for artifacts and then combine them elsewhere. Other solution would be creating Jobs for every subdirectory in your folder. Such Job would always produce artifact but if you have multiple agents then multiple Jobs in the same Stage can be run in parallel making total build time shorter.

Hmm, seems need to set Artifact download task for downloading older artifacts. After that need to develop a script which do this merge stuff if any change happens. As I have limited agents so that will not help as need to run for 25 such directories.

My concern is do the build artifacts persist across builds for you on the build agent's build directory?  If you are using AWS build agents, those build artifacts may disappear between instances of build agents.

However, assuming these build artifacts are there so they do not require being rebuilt, I'd recommend using a proper Makefile to minimize the number of items being rebuilt.

Basically we mark an artifact as milestone to make sure it is retained even after default time for delete. So we can retain it. But seems most of the work we need to do to achieve our use case. As bamboo is just providing a UI for build file and downloads :(

What you are asking for is not what a product like bamboo is designed for (IMO) so you are trying to fit a square peg in a round hole. If you pound on it enough it it will fit, but it won't be pretty ;) I recommend you refactor into multiple builds and create dependencies between them, then only the things that need re-building are built.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 3 hours ago in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

70 views 0 9
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