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:
Get artifacts of an existing build from lower level configuration (for example nightly build), optionally run some steps to re-arrange them, and put into a new build (with new version or using the same version as old build) in higher level configuration ( for example QA build).
Run extra steps to further process an existing build, for example, deploy selected build to the integration test machine.
Generate a new build in higher level configuration (for example QA build) using the same set of source code used by an existing build in lower level configuration (for example nightly build).
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:
Hierarchical name of the configuration from which the build is promoted
Version of the source build
The source build object
The configuration object from which the build is promoted
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:
${promotion.source.servletUrl}
![]() | 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. | |
${promotion.source.configurationHierarchyName}
${promotion.source.buildVersion}
${promotion.source.user}
${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.