Defining and running a build using the Rational Build Agent

You must already have created a project area in Rational Team Concert™ for System z®.
This task is relevant if you are adding a build definition to your project area and you want to use the Rational® Build Agent. Make sure you have created a project area and you want to add a build definition that uses the Rational Build Agent.
  1. If you have not already started the Rational Build Agent, start it now using the bfagent -s command as mentioned in the section on setting up the Rational Build Agent.
    Important: Commands that you execute through the Rational Build Agent are run with the authority of the user who starts the agent.
  2. Locate the BLZCSAMP member in hlq.SBLZSAMP, where hlq is the high-level qualifier you used during the SMP/E installation of Rational Team Concert for System z. Note that this member is actually installed as part of the installation of FMID HAHB200. The BLZCSAMP member provides a sample REXX exec to complete a COBOL compilation. Review the comments in this sample member to understand the parameters and customization you might need for your environment.

Setting up and running a build definition

  1. In the Team Artifacts view, expand the project area folder in which you want to create a build definition.
  2. Right-click Builds > New Build Definition.
  3. In the New Build Definition window, deselect Pre Build Command line and Post Build Command line, select Create a new build, then click Next.
  4. In the General Information window, enter a build definition ID and a brief description of the build definition.
    Important: Select Rational Build Agent from the Available Templates menu.
    Click Next.
  5. In the Additional Configuration window, select both General, Properties, and Rational Build Agent, and then click Finish. The build definition you created opens in the Build Definition editor.

Performing a connection test with the Rational Build Agent

  1. Click the Build Agent tab you created in the previous steps.
  2. Enter the following information to connect to Rational Build Agent:
    Hostname
    The name of the system that uses the Rational Build Agent.
    Port
    The port that communicates with Rational Build Agent. The default is port 5555.
    User name
    The name of the user who is connecting to the Rational Build Agent.
    Note: This user name is used to authenticate the connection to the system. It does not have to be the same user name that started the agent.
    Password
    The password for the given user name.
    Confirm Password
    Enter again the password for the given user name.
  3. Click Test Connection. The results of the connection test are displayed in the Rational Build Agent Connection Test Results box.

Defining a command block for the Rational Build Agent to run

  1. Click the Build Agent Command Line tab.
  2. In the Command field, enter a process command to send to the Rational Build Agent.
  3. In the Working directory field, enter the working directory you want the invoked process to use.
  4. Click Save to save the build definition.
    Tip: The first time you save a build definition, a new build engine called RationalBuildAgent will be defined for the project area. Make sure that RationalBuildAgent is the selected build engine on the General tab of the build definition.
To run the provided sample, you can set up a command block in the Command field similar to the following example:
tso "EXEC 'BGREEN.BETA.SBLZSAMP(BLZCSAMP)''/tmp/RTCZSYSPRINT COBOL.V4R1M0.SIGYSAMP"
cat /tmp/RTCZSYSPRINT
rm /tmp/RTCZSYSPRINT

Requesting a build

  1. In the Team Artifacts view, right-click the build definition, then select Request build. Alternately, you can click the Request Build icon in the upper right corner of the Build Definition window. The Request Build window opens.
  2. Click Submit. The Builds window opens.
    Tip: To monitor the progress of your build while it is processing, click Refresh.

Checking the build results

  1. After the build is complete, double-click your build in the Builds tab to view the build results.
  2. In the Contribution Summary section, click log to view the Logs tab.
  3. Select the log and click Open to display the detailed build results, including Rational Build Agent information and the results of the command block you entered.

Feedback