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.
Procedure
- In the Team Artifacts view, expand
the project folder.
- Right-click Builds; then click New Build Definition.
- In the New Build Definition wizard,
on the New Build Definition page, accept the
defaults and click Next.
- On the General Information page, in
the Available build templates pane, select Command Line - Jazz Build Engine and click Next.
- Optional: If you use Rational Team Concert source
control, on the Pre-build page, select Jazz Source Control and click Next.
- On the Post-Build page:
- Click Next.
- On the Additional Configuration page,
ensure that all options are selected and click Finish.
- In the Build Definition editor, click
the Command Line tab.
- In the Command field, type the command
that invokes your build script.
- Optional: To schedule builds, complete the
following steps:
- Click the Schedule tab.
- To enable build scheduling, under Schedule, select Enabled.
- Select the first schedule entry.
- In the Build Time pane, specify
either continuous build intervals in minutes, or a specific build
time.
- In the Build Days pane, select
the days of the week that the build runs.
- 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.
- Click the Jazz Source Control tab.
- To specify a repository workspace, in the Build workspace pane, click Create.
- 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.
- Click Next.
- On the New Repository Workspace page, in the Repository Workspace Name field,
rename the repository workspace and click Next.
- On the Read Access Permission page,
select the read access permissions for the repository workspace.
- On the Components to Add page,
ensure that your component is selected.
- Ensure that the Load repository workspace
after creation check box is cleared and click Finish.
- To specify a build user for the build workspace, in
the Workspace Owner dialog box, click Open Workspace.
- In the Repository Workspace editor,
in the Owned by field, browse to the location
of your special-purpose build user.
- Click Save.
- 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.
- 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.
- 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.
- Optional: The Components to exclude option can be used to restrict which components are loaded during
the build.
- 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.
- Select any additional options and click Save.