Set Up Build Dependency

You are viewing an old version (v. 11) of this page.
The latest version is v. 19, last edited on Aug 10, 2009 (view differences | )
<< View previous version | view page history | view next version >>

It is quite common that a product is comprised of different components, and a component is used by different products. We suggest to set up builds for these components and products separately in this case, and utilize QuickBuild's dependency mechanism to use result of component builds in product builds.

Dependency mechanism

QuickBuild implements build dependency through a special repository type - QuickBuild Repository. Assume we have two configurations: root/product and root/component. Configuration root/product is created to build the product, and configuration root/component is created to build component. To use component artifacts, you will need to:

  1. Switch to repositories tab of root/product, and define a QuickBuild repository there retrieving desired files from desired build of root/component.
  2. Switch to steps tab of root/product, and add a checkout step into step execution graph to check out from the repository defined above.

If the product depends on multiple components, you will just need to define multiple QuickBuild repositories corresponding to these components, and add multiple checkout steps to check out from these repositories in the product configuration. You can even arrange these checkout steps in a parallel composition step to resolve and retrieve multiple dependencies simultaneously.

Dependency resolution and change detection

Taking the example used in the above section, before retrieving artifacts from configuration root/component, QuickBuild needs to determine which build in root/componentA to be used. The process of resolving dependency build is called dependency resolution in QuickBuild, and is controlled by the property build when define the QuickBuild repository as shown below:

Currently this property can take one of below value:

  • latest finished build (generate new if necessary)
    If this value is selected, QuickBuild will check if a new build is necessary in the dependency configuration (root/component in this case) when resolve the dependency build. If the build is necessary, the newly generated build will be used as the actual dependency build; otherwise, the current latest finished build will be resolved.
    You can also specify variables to customize the dependency build process in this case.
  • latest finished build
    If this value is selected, QuickBuild will directly resolve the dependency build as the latest finished build without attempting to generate a new build in the dependency configuration even if build condition is satisfied.
  • latest recommended build
    If this value is selected, QuickBuild will resolve the dependency build as the latest recommended build. This is very useful to make sure that the product builds always use good and approved builds from component configurations. Newly introduced features in component builds will not affect product builds unless they are approved.
  • latest successful build
    If this value is selected, QuickBuild will resolve the dependency build as latest successful build.
  • specify a build version
    This choice introduces a static dependency. The dependency build version is manually specified and will not be changed unless you set it to another version.

The dependency resolution process is recursive if the dependency configuration itself uses other dependencies. In this case, other dependency resolution processes will be triggered before current resolution finishes.

Like other repository types, changes will be detected in the QuickBuild repository when configuration root/product is triggered. When detecting changes, the dependency resolution process will run to get the actual dependency build. If the dependency build is different from the dependency build used in previous build, QuickBuild thinks the dependency has changed, and will trigger a

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.