When executing Workflows from the command line, different options can be used for passing variables and logging. Table BD-5 provides all available options for omcmdline.jar.
Table BD-5 omcmdline.jar Options
|
Option |
Description |
Parm Value |
|
-BUILD |
Name of the Workflow to execute |
Workflow Name |
|
[env=value,env=value,...] |
Environment Variables to set for the Workflow |
Variable/Value pair separated by commas enclosed within [ ] |
|
-MACHINE_ENV |
Name of the Remote Build Server |
Machine Name |
|
[env=value,env=value,...] |
Environment Variables to set for the Machine |
Variable/Value pair separated by commas enclosed within [ ] |
|
-LOG_LABEL |
Name of the Label to be used in the Workflow Logs Explorer |
Name of the Log |
|
-SYNC |
Wait for Workflow to finish before exiting |
|
|
-OPENMAKE_SEVRER |
URL to Knowledge Base Server |
http://<machine name>:<port>/openmake |
In order for this method of calling the Workflow to work, the specified Workflow must be stored on the Knowledge Base Server. Environment Variables can be passed in at a Workflow level and/or a Machine level. To set Environment Variables for a specific Machine, add the -MACHINE_ENV argument after the Workflow Name. For Workflows that execute on multiple Machines, multiple -MACHINE_ENV arguments can be used.
The -LOG_LABEL parameter can be used to override the Job Name when storing associated HTML log files on the Knowledge Base Server. Multiple Workflows can be run by using either a comma-delimited list after the -BUILD argument or by using multiple -BUILD arguments.
*Note: Any parameters that include spaces must be enclosed in double quotes.
Examples of the –BUILD option:
Single Workflows with no Environment Variables:
-BUILD "Metalworks Dev"
Multiple Workflows with no Environment Variables:
-BUILD "Metalworks Dev,Build Demo Release,Acme Greetings"
Single Workflows with Workflow Level Environment Variables:
-BUILD "Metalworks Dev"[PROJECT=METALWORKS,STATE="UNIT TEST"]
Single Workflows with Workflow Level and Machine Level Environment Variables:
-BUILD "Metalworks Dev"[PROJECT=METALWORKS,STATE="UNIT TEST"] MACHINE_ENV "My Computer"[JAVA_HOME=D:\jdk1.5,DEPLOY=true]
Multiple Workflows with Environment Variables:
-BUILD "Metalworks Dev"[PROJECT=METALWORKS,STATE="UNIT TEST"] -BUILD "Build Demo" -MACHINE_ENV "My Computer"[DEPLOY=false]
Single Workflows with Environment Variables Using LOG_LABEL override:
-BUILD "Template Build Job"[PROJECT=METALWORKS,STATE="UNIT TEST"] -LOG_LABEL "Metalworks Dev"
All logs from a Remote Build Workflow are stored on the central Knowledge Base Server and can be viewed using the Workflow Log Explorer.