Step commands

The step's command element specifies the scripting tool that runs the step and identifies the file that contains the actual script.

The agent that runs the step downloads the plug-in and seeks the script among the downloaded files. The agent must also have access to the scripting tool. Other arguments that are required by the script or tool can also be specified with the arg file attribute. The arg file attributes must be defined so that they are compatible with the scripting tool.

The Create File command script is written in Groovy. Groovy is scripting language that is similar to Java™.

Figure 1. create_file.groovy


This command instructs the Groovy interpreter to run the create_file.groovy command. The next topic provides more information about Groovy and the particulars of this file.

The following line, which is part of every command, sends a file that contains the properties that are required by the step to the agent:

<arg file="${PLUGIN_INPUT_PROPS}"/>

The properties in the file are furnished at runtime and others that are defined earlier that are required by the step. The ${PLUGIN_INPUT_PROPS} variable resolves to the location of this properties file.

The following line, which is also part of every command, refers to the file that the agent returns after it finishes the step:

<arg file="${PLUGIN_OUTPUT_PROPS}"/>

The properties in this file are available to later steps in the process. The ${PLUGIN_OUTPUT_PROPS} variable resolves to the location of this properties file.