Creating build definitions

You can create Jazz™ build definitions that are based on various build templates, such as Rational® Build Forge®, Ant, command line, or Maven. Create and configure a command line definition for a build script. If you must create a build definition by using the other build templates, the steps are similar.

About this task

The following list describes the types of build engines and definitions that you can create and use with Rational Team Concert™ Build:

  • Rational Build Forge: Use this build engine and definition with its corresponding projects.
  • Rational Build Agent: Use this build engine and related definitions for various types of builds; for example, command-line or enterprise build projects, such as iSeries or z/OS® projects.
  • Jazz Build Engine: Use this build engine and related definitions for various types of builds, such as Ant, command-line, or Maven.
  • Hudson/Jenkins Engine: Use this build engine together with a Hudson/Jenkins build.
Note: After you create the build definition, you can create the associated build engine from the Overview page of the build definition editor. You can also create the build engine, then associate it with the build definition from the build definition editor Overview page.
Note: Avoid running multiple Jazz Build Engine instances on the same machine. For more information, see Running multiple JBE processes.

Procedure

  1. In the Team Artifacts view, expand the project folder.
  2. Right-click Builds; then click New Build Definition.
  3. In the New Build Definition wizard, on the New Build Definition page, accept the defaults and click Next.
  4. On the General Information page, in the Available build templates pane, select Command Line - Jazz Build Engine and click Next.
  5. Optional: If you use Rational Team Concert source control, on the Pre-build page, select Jazz Source Control and click Next.
  6. On the Post-Build page:
    • Select ECJ Publishing to publish log files generated by the Eclipse compiler for Java™ (ECJ).
    • Select JUnit Publishing to publish JUnit XML log files.
    • Select Post-build Deliver to configure when to deliver components to a stream after a build.
      Note: Post-build deliver actions are not enabled for personal builds.
  7. Click Next.
  8. On the Additional Configuration page, ensure that all options are selected and click Finish.
  9. In the Build Definition editor, click the Command Line tab.
  10. In the Command field, type the command that invokes your build script.
  11. Optional: To schedule builds, complete the following steps:
    1. Click the Schedule tab.
    2. To enable build scheduling, under Schedule, select Enabled.
    3. Select the first schedule entry.
    4. In the Build Time pane, specify either continuous build intervals in minutes, or a specific build time.
    5. In the Build Days pane, select the days of the week that the build runs.
  12. Optional: If you selected Jazz Source Control in Step 5, complete the following steps:
    Note: Ensure that the build definition refers to a dedicated build workspace, rather than the team stream, so that builds are isolated from ongoing changes in the stream.
    1. Click the Jazz Source Control tab.
    2. To specify a repository workspace, in the Build workspace pane, click Create.
    3. In the New Repository Workspace Wizard, on the Select a stream page, select Flow with a stream and in the lower pane, select the repository stream that you want to build from. This selection enables the repository workspace to accept changes from the stream.
    4. Click Next.
    5. On the New Repository Workspace page, in the Repository Workspace Name field, rename the repository workspace and click Next.
    6. On the Read Access Permission page, select the read access permissions for the repository workspace.
    7. On the Components to Add page, ensure that your component is selected.
    8. Ensure that the Load repository workspace after creation check box is cleared and click Finish.
    9. To specify a build user for the build workspace, in the Workspace Owner dialog box, click Open Workspace.
    10. In the Repository Workspace editor, in the Owned by field, browse to the location of your special-purpose build user.
    11. Click Save.
    12. In the Build Definition editor, in the Load Options pane, in the Load directory field, type the path to the directory on the build machine where workspace files should be loaded.
    13. Optional: To define a subset of component files and folders for the build to load, in the Component load rules field, type the path to the component load rules file.
    14. Optional: To build only if there are changes delivered to a build stream, select Build only if there are changes accepted. This option is only applicable for scheduled builds.
      Tip: To set up a continuous integration build, set the build schedule to run at an interval, such as every 5 minutes, and ensure that the Build only if there are changes accepted option is selected. If no changes are accepted when the scheduled build runs, the build is deleted.
    15. Optional: The Components to exclude option can be used to restrict which components are loaded during the build.
    16. Optional: The build workspace's flow target(s) can be scoped to include only specific components from the target stream(s). Only these components are considered in the pre-build check for whether there are Rational Team Concert source control changes to build. Also, the snapshot for the build includes only these components. For more information, see Flow targets.
  13. Select any additional options and click Save.

video icon Watch videos

CLM playlist
Jazz.net channel
User Education channel

learn icon Learn more

CLM learning circle
Agile learning circle
Learning circles

ask icon Ask questions

Jazz.net forum
developerWorks forums

support icon Get support

Support Portal
Deployment wiki
Support blog