Chapter 10. Build promotion

Build promotion is a very important feature of QuickBuild. As have introduced in the basic concepts chapter, it is a process of generating new build using information of an already existing build. Typical usage scenarios of this feature include, but not limit to:

Having said that, new build is generated based on information of source build. Such information is exposed through an object promotion which can be accessed through the getPromotion() method of current configuration object. Below is some examples of OGNL expressions accessing various promotion information:

${promotion.source.configurationHierarchyName}

Hierarchical name of the configuration from which the build is promoted

${promotion.source.buildVersion}

Version of the source build

${promotion.source.build}

The source build object

${promotion.source.build.configuration}

The configuration object from which the build is promoted

${promotion.setting}

Settings for this promotion. Normally you need not to access this information directly, as they will apply automatically (such as version for the new build, etc.)

With the promotion object available, it is very easy to transfer build artifacts from promotion source to promote destination even if they are in different machines. This is done by checking out build artifacts from a QuickBuild repository with the following properties:

Remote QuickBuild URL

${promotion.source.servletUrl}

[Warning]Warning

In order for this to work, please make sure you've set a correct servlet URL (through administration -> system settings menu) for QuickBuild instance containing the source build.

Configuration

${promotion.source.configurationHierarchyName}

Build

${promotion.source.buildVersion}

User to login

${promotion.source.user}

Password

${promotion.source.password}

With above properties, certain artifacts can be checked out from the source build by defining one or more modules. Several use cases is available to give detail instructions on how to use the build promotion feature.