23
© Copyright IBM Corporation 2012 Trademarks Create software builds with Jazz Team Build Page 1 of 23 Create software builds with Jazz Team Build A guide to using the Jazz Team Build feature in Rational Team Concert Veena H. Balakrishnaiah ([email protected]) Build and Release Engineer IBM Skill Level: Introductory Date: 31 Jul 2012 Veena H. Balakrishnaiah gives an overview of how to configure source control and Jazz Team Build components of Rational Team Concert to define and manage your build. Jazz builds run against files that come from a designated build repository workspace and include traceability between change sets and work items. Jazz Team Builds provide support for the automation, monitoring, and awareness of a team's regular builds. Introduction This article explains the Team Build feature of the Jazz™ technology platform that provides support for the automation, monitoring, and awareness of a team's regular builds. The Jazz Team Build provides a model for representing the team's build definitions, build engines, and build results. Although the build toolkit is best suited for Apache Ant builds, you can use any scripting technology that can invoke Ant. For example, a team can use Perl, DOS batch files, or Make to create build scripts that interact with Jazz Team Build. A team typically has a build system that runs builds from a dedicated build machine. All build-related items belong to a project area. Build-related operations are governed by the project's process. Configure Rational Team Concert components This section explains how to configure source control and Builds components of IBM® Rational Team Concert™. Jazz builds can include traceability between change sets and work items. You typically run a build against files that come from a

Create software builds with jazz team build

  • View
    829

  • Download
    1

Embed Size (px)

DESCRIPTION

A guide to using the Jazz Team Build feature in Rational Team Concert Veena H. Balakrishnaiah ([email protected]), Build and Release Engineer, IBM Summary: Veena H. Balakrishnaiah gives an overview of how to configure source control and Jazz Team Build components of Rational Team Concert to define and manage your build. Jazz builds run against files that come from a designated build repository workspace and include traceability between change sets and work items. Jazz Team Builds provide support for the automation, monitoring, and awareness of a team's regular builds. This article originally appeared at http://www.ibm.com/developerworks/rational/library/create-software-builds-jazz-team-build/index.html?ca=drs-

Citation preview

Page 1: Create software builds with jazz team build

© Copyright IBM Corporation 2012 TrademarksCreate software builds with Jazz Team Build Page 1 of 23

Create software builds with Jazz Team BuildA guide to using the Jazz Team Build feature in RationalTeam Concert

Veena H. Balakrishnaiah([email protected])Build and Release EngineerIBM

Skill Level: Introductory

Date: 31 Jul 2012

Veena H. Balakrishnaiah gives an overview of how to configure source controland Jazz Team Build components of Rational Team Concert to define andmanage your build. Jazz builds run against files that come from a designatedbuild repository workspace and include traceability between change sets andwork items. Jazz Team Builds provide support for the automation, monitoring, andawareness of a team's regular builds.

Introduction

This article explains the Team Build feature of the Jazz™ technology platform thatprovides support for the automation, monitoring, and awareness of a team's regularbuilds. The Jazz Team Build provides a model for representing the team's builddefinitions, build engines, and build results. Although the build toolkit is best suitedfor Apache Ant builds, you can use any scripting technology that can invoke Ant. Forexample, a team can use Perl, DOS batch files, or Make to create build scripts thatinteract with Jazz Team Build.

A team typically has a build system that runs builds from a dedicated build machine.All build-related items belong to a project area. Build-related operations are governedby the project's process.

Configure Rational Team Concert components

This section explains how to configure source control and Builds componentsof IBM® Rational Team Concert™. Jazz builds can include traceability betweenchange sets and work items. You typically run a build against files that come from a

Page 2: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 2 of 23

designated build repository workspace that has incoming flows from the team's maindevelopment stream.

Before running the build, all of the latest changes are accepted from the team'sstream and a reproducible snapshot of the files is created. The change sets and workitems included in the build are recorded to view.

Prerequisites

This article is based on these assumptions:

• The Rational Team Concert 3.0.1.3 server is already set up, and you haveaccess to the server through Rational Team Concert Eclipse client.

• The required source code for build is present in the Rational Team Concertproject area source control

• The Build System Toolkit has been installed by using the IBM InstallationManager.

Working with the repository workspace

1. Launch the Rational Team Concert Eclipse client.2. Log in and connect to the existing repository connection, based on your team

invitation.3. Connect to the existing project areas or create a new project area by using the

Scrum template.4. Create a new repository workspace from the required stream of the source

control component, which acts has a local copy or development workspacewhere the changes can be made on the repository files:

a. From the required stream, right-click and select New.b. Choose Repository Workspace from the next menu, as shown in Figure

1.c. Enter an appropriate name in the Repository Workspace Name field, and

click Next (Figure 2).d. In next dialog windows, leave the default selections.

Note:If you are not the administrator and not able to create the project area, send arequest to the Rational Team Concert project admin to create a project area with thedefault Scrum template.

Page 3: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 3 of 23

Figure 1. Source Control menus

Page 4: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 4 of 23

Figure 2. Create a new repository workspace

5. Select the components that need to be added to the My Repository Workspace.If you want all of the components to be added, choose the Select All option orselect the components one by one, based on the requirement, and click Finish(see Figure 3).

Page 5: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 5 of 23

Figure 3. Select components to add to the new repository workspace

6. From the list of options in the Load Repository Workspace window, select anoption to load the selected components that you selected in the previous step,and click Next, as shown in Figure 4.

Note:If you choose "Load the root folders of the components as projects" (Figure 4), theroot folder is the name of the component in Rational Team Concert source control. Itis left to you to select the other loading options, based on how the project folders aredefined.

Page 6: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 6 of 23

7. After choosing one of the load options, you will prompted to select which foldersof each component need to be loaded into the Eclipse workspace, as shown inthe Load Repository Workspace view in Figure 5.

Figure 4. Load all of the projects within the components

Page 7: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 7 of 23

Figure 5. Folders to load into the Eclipse workspace

8. To view the component that is loaded, navigate toward the lower right section ofthe Eclipse client window. Right-click the component name, select Show, andchoose Repository Files to view all files and folders in that component.

Page 8: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 8 of 23

Figure 6. Repository component expanded to list repository files

9. Expand the folders to view the desired file. Right-click on the file, and clickOpen Local file to open it in edit mode. If you simply want to view the file,double-click on the filename.

Page 9: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 9 of 23

Figure 7. Open the local repository file to make changes

10. Make necessary code changes to the file, Save and close the file.11. Click the Pending Changes tab, and expand the folder.12. Right-click on the modified file, and then select Check-in and Deliver to

integrate the changes with the main stream of Rational Team Concert sourcecontrol. Add a comment as necessary in comment section.

Page 10: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 10 of 23

Figure 8: Check-in and Deliver option on the Pending Changes menu

13. To deliver the changes, the file has to be associated with a Rational TeamConcert work item. If a work item is already created, choose Select an existingwork item option; otherwise, select Create a work item so you can associatethe changes that you made, as shown in Figure 9.

Page 11: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 11 of 23

Figure 9. Associating changes with a work item

14. While you are creating a work item, fill in all of the mandatory fields, includingSummary and Filed Against, and then click Finish, as shown in Figure10.

Page 12: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 12 of 23

Figure 10. New Work Item dialog window

Changes will be reflected in the main integration stream of the connected projectarea's source control, and they will be associated with the work item that you created.

Page 13: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 13 of 23

Using the Rational Team Concert Builds component

1. To create a new build engine, expand Builds, right-click on Build Engines, andselect New Build Engine.

2. In the New Build Engine dialog window (Figure 11), enter the ID, which will bethe build engine name. From "Available build engine types," select Jazz BuildEngine and then click Finish.

Figure 11. Available build engine types

Page 14: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 14 of 23

3. After you save the build engine configuration, because the Jazz Build Engineis not running, you will see this warning: The build engine process may not berunning.

a. Run the Jazz Build Engine (JBE) from the command line in the BuildSystem Toolkit installation directory (words in italics vary according to yourenvironment):Usage: jbe -vm "location of Java developer kit"–repository repository URL -userId build username-pass build user password -engineIdBuildEngine_Identifier

b. To create an encrypted password file, from the command line type(pass.txt can be any filename):jbe -createPasswordFile pass.txt

c. When prompted, type the password. The password is encrypted andstored in a pass.txt file that is located in the Build System Toolkitinstallation directory.Usage: jbe -vm "location of Java developer kit"–repository repository URL -userId build username-passwordFile build user password file -engineId BuildEngine_Identifier

Note:Location of Java developer kit is the path of the jdk folder included in the RationalTeam Concert Eclipse client download.

Figure 12. Run the Jazz Build Engine from the command line with theencrypted password file

Note:After the build engine is created, it gets displayed under Builds in the Build Engineview of the project area.

4. To create the new build definition, right-click Builds, and select New BuildDefinition.

5. In the New Build Definition window, choose the available build templates fromthe list based on the build tool used for the builds, as shown in Figure 13.

• If you are using Ant as build tool, the build template will be Ant-Jazz BuildEngine.

• If you are using any other tool or scripting language, choose CommandLine-Jazz Build Engine, so you will be able to run scripts or commands torun a build.

Page 15: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 15 of 23

Figure 13. Creating a build definition with Command Line - Jazz Build Engine

6. In this step, you will be prompted to customize the build definition based on theoption that you chose in Step 5. Select Jazz Source Control if customization isrequired, and click Finish.

7. Enter the respective details in the Build Definition dialog window:a. Under the Overview tab, select the build engine that is created by clicking

the Edit button. If you want to create new build engine, click on the Createbutton.

b. Under the Schedule tab, define the scheduled timing based on which builddefinition will be executed.

Page 16: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 16 of 23

c. Under the Properties tab (Figure 14), add the name and values of theproperty as demanded by build scripts.

Figure 14. Properties tab of the Build Definition dialog window

8. Still in Build Definition window, if you have chosen Jazz Source Control asmentioned in Step 6, fill in the Workspace and Load Directory fields, as shownin Figure 15:

a. For Build Workspace, click Select, and choose the workspace or streamfrom the drop-down menu.

b. In the Load Directory field, mention the absolute directory where the localcopy of the stream has to be loaded.

• Choose Delete directory before loading if the folder already existsand needs to be deleted before loading.

• Choose Create folders for components if the folder has to becreated for each component, which resolves conflict when the foldername for two or more components is same.

Page 17: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 17 of 23

c. Under the Accept Options section, to accept the changes automaticallybefore loading, click both check boxes listed.

Note:If you want to create builds on a snapshot instead of working on the main stream,create a snapshot from the stream:

• Right-click on the stream, select New, and choose Snapshot.• Later, in the Jazz Source Control tab, select the snapshot that you have created

rather than the stream.

Figure 15. Jazz Source Control tab of the Build Definition view

9. In the Command Line tab of the Build Definition window shown in Figure 16:

Page 18: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 18 of 23

a. Enter the build script or build file or the build command in the Commandfield. This script or command will be invoked when users request a build.

b. In the Arguments field, enter the command line arguments, if any.c. In the Working directory field, enter the working directory to be used by the

invoked command.d. If any external properties file that the build is using, mention the file name

in Properties file field.

Note:In the Command field, you can directly specify the Ant file (build.xml) or any scriptthat invokes Ant.

Figure 16. Command Line tab of the Build Definition

10. After you have entered all information in the Build Definition tabs, Save thedefinition.

11. To request a build, right-click on the build definition that you created, and selectRequest Build from the drop-down menu.

Page 19: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 19 of 23

12. In the Request Build window, Browse for the build engine created under Buildoptions. Mention the build properties, if any, in Build Properties, and clickSubmit.

Figure 17. Request a build with the available build engine

Note:For the build to be started, make sure that the Jazz Build Engine (JBE) is runningwith the same username as the owner of the workspace.

13. The build starts with loading the source files to the local build machine and thenexecutes the build command.

14. After the build is finished, the screen displays details, along with log file (Figure18).

Tip:If work item needs to be created, you can do it by clicking Create Work item orAssociate on existing work item.

Page 20: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 20 of 23

Figure 18. Rational Team Concert summary of the build status

Page 21: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 21 of 23

ResourcesLearn

• More about Rational Team Concert:• Find Rational Team Concert articles and links to many other resources on

IBM developerWorks, and check the product overview page, features andbenefits, system requirements, and the user information center.

• Check the Rational Team Concert page on Jazz.net.• Watch the Using Rational Team Concert in a globally distributed team

webcast or a demonstration of the Dashboards and reports, or listen to thepodcast about IBM Rational Team Concert and Jazz.

• Visit the Rational software area on developerWorks for technical resources andbest practices for Rational Software Delivery Platform products.

• Subscribe to the developerWorks weekly email newsletter, and choose thetopics to follow. Stay current with developerWorks technical events andwebcasts focused on a variety of IBM products and IT industry topics.

• Attend a free developerWorks Live! briefing to get up-to-speed quickly onIBM products and tools, as well as IT industry trends.

• Watch developerWorks on-demand demos, ranging from productinstallation and setup demos for beginners to advanced functionality forexperienced developers.

• Improve your skills. Check the Rational training and certification catalog, whichincludes many types of courses on a wide range of topics. You can take someof them anywhere, any time, and many of the "Getting Started" ones are free.

Get products and technologies

• Download Rational Team Concert from Jazz.net and try it free on up to 10projects for as long as you want (requires registration). If you would prefer, youcan try it in the sandbox instead, without installing it on your own system.

• Evaluate IBM software in the way that suits you best: Download it for a trial,try it online, use it in a cloud environment, or spend a few hours in the SOASandbox learning how to implement service-oriented architecture efficiently.

Discuss

• Rate or review Rational software. It's quick and easy.• Share your knowledge and help others who use Rational software by writing a

developerWorks article. Find out what makes a good developerWorks articleand how to proceed.

• Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube,and add your comments and requests.

• Ask and answer questions and increase your expertise when you get involvedin the Rational forums, cafés, and wikis.

Page 22: Create software builds with jazz team build

developerWorks® ibm.com/developerWorks/

Create software builds with Jazz Team Build Page 22 of 23

• Get connected. Join the Rational community to share your Rational softwareexpertise and get connected with your peers.

Page 23: Create software builds with jazz team build

ibm.com/developerWorks/ developerWorks®

Create software builds with Jazz Team Build Page 23 of 23

About the author

Veena H. Balakrishnaiah

Veena H. Balakrishnaiah is part of the Operations Software EngineeringService team at the IBM Software Labs in India, where works on variousproduct builds. Veena has a master's degree in software systems. Sheis experienced with SCM and automation tools, including IBM RationalClearCase. IBM Configuration Management Version Control (CMVC),Rational Team Concert, and Rational Build Forge.

© Copyright IBM Corporation 2012(www.ibm.com/legal/copytrade.shtml)Trademarks(www.ibm.com/developerworks/ibm/trademarks/)