Lesson 7: Building with Rational Team Concert Build
About this task
- Define a schedule: A particular build operates on a schedule you define. Recall from the section on Rational Team Concert source control that a team shares their development work in one or more team streams.
- Check for changes: When it is time to run a build for a team, Rational Team Concert Build checks to see if there are any changes in the content of the team's streams and accepts the changes, known as change sets, into its own build workspace so it has a current copy of the stream(s).
- Fetch repository content and run build: The build then fetches the build workspace content to the file system where your build scripts perform the build.
- Publish artifacts to repository: Build artifacts are published into the Rational Team Concert repository for access by users.
- Send notification that a build is complete: The status of all builds is reported in real time and you are automatically notified when builds complete.
- Define a build script (we'll let your Eclipse Jazz client do most of the work here)
- Define a build definition that identifies your build script
- Define a build engine to run the defined build
- Start the build engine that will respond to build requests, run builds, and publish results
Setting up an Eclipse workspace for the build team member
About this task
Procedure
- Switch to a new Eclipse workspace.
- Create a repository connection.
- Connect to the Prelude project area.
Results
Creating a dedicated repository workspace
About this task
Procedure
- In the Team Artifacts view, right-click My Repository Workspaces; then click .
- In the New Repository Workspace wizard, on the Select a Stream page, click the Flow with a stream radio button and in the pane below, and select Prelude Stream (Prelude).
- Click Next.
- On the New Repository Workspace page, type the build workspace name Prelude Build Workspace and click Next.
- On the Select repository page, ensure that Use current repository is selected and click Next.
- On the Read Access Permission page, ensure that Public is selected and click Next.
- On the Components to Add page, confirm that the stream's component is selected and ensure that the Load repository workspace after creation check box is selected.
- Click Finish.
- On the Load Repository Workspace page, ensure that Find and load Eclipse projects is selected and click Next.
- On the Load Eclipse Projects page, ensure that the Hello World project that you created in an earlier lesson is selected and click Finish. The new repository workspace displays below the My Repository Workspaces folder. The workspace component has also loaded. Switch to the Package Explorer view, to view the Hello World project that you created earlier.
Creating a build script
Before you begin
Procedure
- In the Package Explorer view, right-click a project; then click Export.
- In the Export wizard, on the Select page, under General, select Ant Buildfiles and click Next.
- On the Export page, ensure that your project and all check boxes are selected and click Finish.
Results
Creating a build definition and build engine
About this task
Procedure
Results
Delivering the build script
Procedure
Results
Starting the build engine
Before you begin
About this task
Procedure
Results
Touring the Rational Team Concert Build User Interface
The Jazz client allows you to do the following build tasks:
- Request that a build run
- Monitor the status of builds
- Query available builds
- Inspect completed builds, identify, and retrieve the artifacts produced
Examine each of these tasks.
Requesting a build
About this task
Procedure
Results
If the build did not run correctly, examine the log file published in the build result.
Viewing build results
Procedure
- If you were quick you could have clicked on the build in the alert window above.
- Another way is to go the Team Artifacts view, expand your Prelude project area and the Builds section. You will see your build definition. Open the build result using menu action Open Latest Build Details. The build result editor opens.
Results
You have completed the following tasks:
- You submitted a build request. It could have been initiated automatically on a predefined schedule.
- The request was received by the Jazz Build Engine along with the build definition.
- Using a build workspace configured in the build definition (Prelude Build Workspace), the Jazz Build Engine performed an accept operation to update the build workspace from the stream. In the first build, this brought the newly created build script (build.xml) to the build workspace, which is essential to run a build.
- The updated contents of the build workspace were loaded into the file system, using the directory named fetched in the build definition.
- The build script specified in the build definition is called. Our script compiled the HelloWorld project and created Java class files. A more sophisticated script might have created a jar file and published it back to Jazz.
- When the script completes, the build log and any other published results are stored in the Jazz repository.
- The team is notified that the build has finished.
Build result editor
- The status of the build: completed or not; successful or not.
- Start time, completion time, and duration.
- Any work items or source control changes associated with the build. In the example, below you can see that one work item was included. If you were to open it, you would see that it is the work item associated with the delivery of the HelloWorld build script. Notice in the Links section that there is a reference to the change sets that were included in the work item and the build containing these changes. In Jazz there is bidirectional traceability between work items, change sets, and builds.
- You can create a work item or associate an existing work item with this build. This is particularly useful if the build failed.
- Build history. Selecting this displays the history detail in the Builds view (you need to request another build to see a history).
- The editor is extensible to include additional pages that your team might need.
Examining the build log
Procedure
Monitoring the status of builds
As builds complete, in the Team Dashboard view, the Build section is updated with the status of completed builds for the team(s) you participate in.
For a selected build in this view, you can see the results of the build or request a new build.
To customize how often the status is updated:
- In the Team Dashboard view, from the Build section, click Menu; then click Update Refresh Interval. In the Build Section Refresh Interval Dialog box, type the refresh interval in seconds and click OK.
Finding available builds
The contents of the view can be sorted by selecting a column. There are several interesting menu actions. You can compare a build to the stream from which it was built or create a new stream from a build (helpful for creating a new code base from a proven code base).
You can also view build results by defining a build widget in your web-based Jazz dashboard:
The Jazz development team has been customizing its build process for awhile. Jazz's build results editor has additional tabs labeled Compilation, JUnit, and Downloads, and External Links. Here is a screen capture from a Jazz build so you can see what the potential is.
Lesson checkpoint
Watch videos CLM playlistJazz.net channel User Education channel |
Learn more CLM learning circleAgile learning circle Learning circles |
Ask questions Jazz.net forumdeveloperWorks forums |
Get support Support PortalDeployment wiki Support blog |