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

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

abhinav_bipnesh June 8, 2015

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
Krystian Brazulewicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2015

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?

abhinav_bipnesh June 9, 2015

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.

Krystian Brazulewicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2015

What programming language/technologies your project uses?

abhinav_bipnesh June 9, 2015

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-1.0.0.100.rpm 2. Now initially we would have packages like en-1.0.0.10.rpm, enu-1.0.0.10.rpm and fr-1.0.0.10.rpm So we want to have mixed artifacts from the previous build and this build so the publish artifacts like below en-1.0.0.100.rpm, enu-1.0.0.10.rpm, fr-1.0.0.10.rpm Any thoughts how we can achieve it. As the build host are CentOs one we can have any language support to build the framework.

Krystian Brazulewicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2015

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.

abhinav_bipnesh June 9, 2015

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.

0 votes
Alex Soto June 9, 2015

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.

abhinav_bipnesh June 10, 2015

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 :(

Alex Soto June 10, 2015

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
TAGS
AUG Leaders

Atlassian Community Events