How to dynamically select environment variables for a project

Technote (FAQ)


Question

How do you dynamically select environment variables for running a project in IBM Rational Build Forge?

Cause

One project might need to be run on multiple servers with different environment variables. If environment variables can be dynamically selected before executing the project, lots of redundancy projects can be avoided to create.

Answer

The following steps explain how to create a dynamic selection of environment variables:

Pre-requirement:

The bftool from the following page: http://www.ibm.com/developerworks/rational/library/08/0930_toma/

Detailed steps:

  1. Create multiple different environment variables
  2. Create a sample project with one of environment variables
  3. Use bfexport to export that project into an xml file (1.xml) then remove sample project
  4. Write a script by using same contents of 1.xml but replace the environment name with command variable $1
  5. Create a project with following commands:
    1. Calling the script and passing the environment name as command variable to
    2. Generate a xml file
    3. Use bfimport to import the xml file, create a new project
    4. Use passchain to run the newly imported project
    5. Use bftool rmproject to remove the newly imported project

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Build Forge
API: Console Interaction

Software version:

7.1.2, 7.1.3

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Software edition:

Enterprise, Standard

Reference #:

1608314

Modified date:

2012-08-27

Translate my page

Machine Translation

Content navigation