How do you dynamically select environment variables for running a project in IBM Rational Build Forge?
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.
The following steps explain how to create a dynamic selection of environment variables:
The bftool from the following page: http://www.ibm.com/developerworks/rational/library/08/0930_toma/
- Create multiple different environment variables
- Create a sample project with one of environment variables
- Use bfexport to export that project into an xml file (1.xml) then remove sample project
- Write a script by using same contents of 1.xml but replace the environment name with command variable $1
- Create a project with following commands:
- Calling the script and passing the environment name as command variable to
- Generate a xml file
- Use bfimport to import the xml file, create a new project
- Use passchain to run the newly imported project
- Use bftool rmproject to remove the newly imported project