heavy tag/branch use - how to dynamically introduce them to clone

I have searched for an answer for this; Who knows it may be as simple as bamboo pulling a tag out of JIRA but not sure.
We make heavy use of tags and branches just some random repository I walked into just while typing this has 888 tags and a dozen branches.

I need a way to introduce tags and branches into builds without having to go through time-consuming source repository edits. Almost every production build can use one of many branches, and sometimes tags are necessary for particular builds in branches.
Can this be done through JIRA? I assume that is the proper way but I don't see how this would be configured in Bamboo.

Do i need some other external plugin?

Any suggestions, pointers appreciated.

1 answer

my 2 cents:

1) Simplify your builds. Tags should be read only, so builds should be read only and created just once. For each tag, we have a special storage on our development server where we placed the build. If somebody wants to get the version of a certain tag, it goes there (and does not go again on the cycle, fetch the source, generate sources, compile, blah, blah). It's better and saves a lot of time.

2) Every time I needed to build several branches using CI tools (Bamboo, Jenkins), I did it using ant scripts which were pulling out the branches and did the build, defining just one build project in the CI tool. It worked for me, dont know how it will suit you.See for instance http://subclipse.tigris.org/svnant.html .

Here's how you do a for in ant ( the following assumes antcontrib is installed ), don't know if ant has finally added native support for that

<!-- Auto generation of ibatis support, does not work per se, it's given as an example from an older project of mine ... -->

<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath refid="antcontrib.classpath" />
</taskdef>

...........

<loadfile property="ibatis.table.list"
srcfile="${build.temp.dir}/tablelist.txt" />
<for list="${ibatis.table.list}" delimiter="," param="tabname" trim="true">
<sequential>
<if>
<not>
<equals arg1="@{tabname}" arg2="" />
</not>
<then>
<!--echo message="Generating iBator config for: @{tabname}" / -->
<echo message="&lt;table schema=&quot;${jdbc.schema}&quot; tableName=&quot;@{tabname}&quot;&gt;&lt;/table&gt;${line.separator}"
append="true"
file="${build.temp.dir}/${ibator.config.file}.fragment"/>
</then>
</if>
</sequential>
</for>

3) Use maven, if not already (Sonatype has a free version of their server). Maven will cover first point because it is storing artifacts published with a certain version. This means that you will need to come with a consistent versioning of the products you are building, so it's good because it will ask you to keep it tidy. [Note: we prefere to keep aside the jar itself at the tag, although it's not necessary, maven has it already after each 'mvn deploy', but old habits die hard]

thanks for the suggestions.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

181 views 3 6
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