Child pages
  • Bamboo Tag Build Plugin
Skip to end of metadata
Go to start of metadata

Name

Bamboo Tag Build Plugin

Version

1.1.0

Product Versions

1.2.4

Author(s)

David Peterson

Organisation

CustomWare Asia Pacific

Homepage

 

Price

Free

License

BSD

JavaDocs

 

IssueTracking

TBA

Download JAR

bamboo-tagbuild-plugin-1.1.0.jar

Download Source

CODEGEIST:Archive Subversion

Description/Features

Adds a tab to projects which lists any existing tags which already exist and allows you to build them with Bamboo. This is handy when you want to do a one-off build of a tag, or use Bamboo to create your project with the full test reporting, Clover analyzing and other handy features that come with it.

Note

Currently this plugin only supports projects which use a Subversion repository. CVS support is in progress.

Installation

  • Download the CODEGEIST:plugin jar.
  • Copy it into the 'webapp/WEB-INF/lib' directory of your Bamboo server.
  • Restart Bamboo.

Usage

There are two main features - the 'Tags' tab and a custom build notification.

The 'Tags' Tab

This is the main location of interest for the plugin. It lists any existing tags (as well as who created them and when), provides an option to 'Checkout and Build' the specific tag, and lists any existing builds for each tag. It looks like this:

When you click 'Checkout and Build' for a particular tab, it will do the following:

1. Create a clean checkout of the specified tag from your repository.
2. Execute a build for that checkout using the current build settings for this project.
3. Create a record for the build as for a normal 'Manual build' of the project, along with any artifacts, test cases, etc that you would usually have.
4. Notify anyone registered with a 'Builds From Tags' notification that the tag build occurred.

If you want to check that a build was for a specific tag, look for the 'custom.tagbuild.tag' property in the 'Metadata' tab of a project build.

'Builds From Tags' Notification

You can also configure your project to notify users when someone manually triggers a build of a particular tag version. To do so, do this:

  • Enter the 'Configuration' tab for your project.
  • Select the 'Build Notifications' tab.
  • Add a new notifiation.
  • Select 'Builds From Tags' as the notification type, and add the user details for notification.
  • Save the notification.

Examples

A typical release procedure for a project might be as follows:

  1. Complete customisations for the new project version and check them into your VCS repository.
  2. Create a new tag for your project.
  3. Set up your Bamboo project to preserve the project build data as an artifact.
  4. Navigate to the 'Tags' tab and run a build of the new tag.
  5. Assuming it passes, grab the built artifacts for the project and make them available to the target audience.

Version History

Version

Date

Notes

1.1.0

27-Mar-2008

  • Initial public release

Screenshots

20 Comments

  1. Hi David,

    Cool idea there....

    Would it be possible to take the idea even further and run builds off specific revisions, even?

    That way, we can actually put in a "re-run" facility for builds.

    Cheers,
    Edwin

    1. Assuming I understand you correctly, it should be possible to allow you to enter a specific revision number and do a build that way. It would have to be free-form basically, and I'm not 100% certain I can even pull the current revision number easily to make it easier to guide users where to start from. I haven't looked into that aspect of it. But not a bad idea.

      Out of curiosity, why do you need to want that level of granularity? I'm not sure what you mean by a "re-run" facility. Could you expand?

      There was also a possibility of adding a 'branch' build option also, but it starts getting a bit crowded pretty quickly.

  2. Hi David,

    I like this idea. With CVS support and the ability customise the builder goal for the tag build this could simplify our release management process quite a bit.

    Cheers,
    Brad.

    1. Could you elaborate on what you mean by customising the builder goal? As in, having the tag build run something like 'mvn do other stuff' instead of the standard goal? Could be handy I guess, but gets tricky to implement, particularly when you have several options for builders.

      Could you give an example of what you would like to do with it? That would guide any development in that direction more accurately.

      1. Basically what you said. A normal build might run the "install" goal, a tag build might do "deploy". Or add a few property overrides (-Dproperty=value).

  3. David, 

    Any chance Bamboo 2.0 will be supported?

    Cheers
    Nicholas 

    1. Yeah, I hope to get Bamboo 2 and CVS support in before the end of the Codegeist. We'll see if I can find the time...

  4. Hi David,

    great plug-in. Exactly what we were looking for here.

     
    I have a question about the plug-in locating the tags. At present, we store all our tags in svn/tags. Our trunk code is stored in svn/trunk/products/pcam/productName and our branches in svn/branches/branchName/products/productName. As such I can't pick up the tags for my builds.

     
    My two questions are:

     1. How can I customize the plug-in to look for the tags in our location?

    2. Can we link the tags to the trunk/branch through the revision number, instead of where it's stored?

     Thanks for your help,

     Steve

    1. Sorry - missed this earlier. To answer your questions:

      1. You'll have to do a source code mod presently. Basically, it guesses your tag location based on the location of the project within your /trunk. For example, if your base SVN path is 'svn.foo.com/trunk/myProject', the plugin will look for folders in 'svn.foo/com/tags/myProject' (eg 'tags/myProject/1.0', etc). If you want something else, it will have to be either a source modification, or an enhancement which lets you specify the tag root in a config screen (the better solution, but doesn't currently exist).

      2. I'm not actually sure if this would be technically possible. The method I'm using to get tags building at all is a pretty big hack...I don't know if you can get revision numbers anywhere directly currently.

  5. I'd be really interested in being able to get a tagged build initiated via the REST api - can this plugin be 'poked' via the existing REST api via parameters or should I be looking at coding something up (assuming that's possible to do via a plugin anyway? - sorry if that's a silly question, only day 2 on plug-in development)

    i.e. something along the lines of 

    http://bamboo.host:8085/updateAndBuild.action?buildKey=PRJ-INT&tag=1.0.2\\

    1. Well, there should be a URL provided by the plugin that you could point to manually - essentially the tip would be to install the Tag Build plugin and right-click on the 'Checkout & Build' link and then modify the URL for your particular tag, etc.

  6. I'm looking for the ability to setup a build plan that, whenever a new tag is created, will essentially run a build against that new tag.  Doing this, I could not only automatically verify that new tags build properly, but could also run reports, send notifications, and deploy the site.  Would this plugin provide a decent starting place for this?  Any pointers on where to start?

    Thanks

    1. I guess it could. It certainly provides an XWork action that will checkout and build a particular tag. The tricky bit would be detecting the fact that the new tag has been added. You would have to have some job scheduled to check the 'tags' path periodically and detect if any new subdirectories have been added. But I haven't looked into Bamboo's APIs lately to be sure exactly how that would be implemented.

  7. We get

    Caused by: java.lang.AbstractMethodError
    	at java.util.Arrays.mergeSort(Unknown Source)
    	at java.util.Arrays.sort(Unknown Source)
    	at java.util.Collections.sort(Unknown Source)
    	at com.atlassian.bamboo.ww2.actions.build.admin.config.ConfigureBuildNotification.updateConditionObjectsForEdit(ConfigureBuildNotification.java:330)
    	at com.atlassian.bamboo.ww2.actions.build.admin.config.ConfigureBuildNotification.validate(ConfigureBuildNotification.java:255)
    	at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:154)
    

    In bamboo 215 the plugin interface has changed. You need to implement the compareTo() method.
    In your implementation this method does not exists and leads to above error.

    1. Thanks for the tip. There is an update in SVN which should run in Bamboo 2.1.x, but we haven't had time to do a full release yet.

  8. +1

    I'd love to start using this plugin today. It's simple but very very useful. But I'm on version 2.1.x of Bamboo. Any chance of an update?

    1. There is an update in SVN trunk for Bamboo 2.1.x, but we haven't had a chance to do any serious testing on it for a full release.

  9. hi

    i have this question

    we have a different SVN Repositories Structure that the plugin are not working with

    how can i customized the plugin to look for my tags so the plugin can work

    http://localhost/svn/myproject/Trunk

    http://localhost/svn/myproject/Tags

    http://localhost/svn/myproject2/Trunk

    http://localhost/svn/myproject2/Tags

    please advice

    regards

    1. Currently the plugin is hard-coded to look for 'tags' (lowercase). A customisation currently would require you to modify the source code and do a custom build. An option for the future would be to provide a configuration screen for the project somewhere. I haven't looked into what options exist for that.

  10. Hi,
    I have built the latest revision from SVN and installed in Bamboo 2.2.4.
    I can browse the tags in the Tags tab, but when I try to "Checkout and build" the build failes because it doesn't find the pom.xml.
    The pom.xml is located under R01_00_INC02/module-name/, but Bamboo is looking in module-name/ as this is what is configured as Working Sub Directory.
    It also seems like all the tags are checked out, instead of just the tag I'm trying to build.
    I know the plugin isn't released for Bamboo 2.x, but we really need this, so I was hoping there is an easy way to fix this :)