Creating project template properties

Properties can be used to manage variables passed into commands, agent filters, and custom stamping algorithm templates.

Properties use the syntax ${property:[property_name]} to pass property values.
  1. From the IBM® UrbanCode™ Build dashboard, click Templates, then click a project template.
  2. Click Properties, then select a template.
  3. Click Create.
  4. Using the Properties tab, type a name for the property in the Name field.
    The property can be referenced by using the property syntax: ${p:property_name}.
  5. Select a display type from the Display Type list.
    The display type determines how the property is presented to users in the UI. The types are
    • Agent Pool provides a list of agent pools. If selected, the Agent Pool field is displayed, where you can specify a default agent pool.
    • Checkbox provides a check box. If the box is checked, the value is true; otherwise, the value is false. If selected, the Default Value check box is displayed, where you can specify a default value.
    • Integration Plug-in provides a list of integration plug-ins. If selected, the Property Group field is displayed, where you can specify a default integration plug-in.
    • Multi-select provides a list of values from which users can select multiple values. If selected, the Default Value field is displayed, where you can specify default selections. Separate multiple selections with commas.
    • Select provides a list of values from which users can select a single value. If selected, the Default Value field is displayed, where you can specify a default selection.
    • Text provides a text-input field. If selected, the Default Value field is displayed, where you can specify a default value.
    • Text (secure) provides a text-input field in which user input is replaced by generic symbols. If selected, the Default Value field is displayed, where you can specify a default value.
    • Text Area provides a text-input field in which users can enter a large amount of text. If selected, the Default Value field is displayed, where you can specify a default value.
  6. Use the Value area to specify rules for the selected display type.
    • If you want to specify the property rules now during design time, click Defined and configure the following fields.
      • If you want users to specify a value for the property, click Required.
      • Enter all possible values for this property in the Allowed Values text area. Put each value on a separate line.
      • Optionally, enter a default value for the property in the Default Value field.
      Note: Depending on the selected display type, some value-related fields might not be displayed.
    • If you want the property values to be generated by a preprocessing script, click Script and configure the following fields.
      • If you want users to specify a value for the property, click Required.
      • Enter a BeanShell script that generates property values in the Allowed Values Script text area. The script is passed the following implicit variables: project, workflow, buildLife. Put each value on a separate line. The script should return:
        • String value for text, text area, text (secure), and select types.
        • Boolean for the check box type.
        • String array or collection for the multi-select type.
        • The agent pool name for the agent pools type.
        • Null if the field is hidden for all property types.
      • Optionally, enter a BeanShell script that generates a default value in the Default Value Script text area.
      Note: Depending on the selected display type, some value-related fields might not be displayed.
    • If you want the property values to be generated by a job step, click Job Execution and configure the following fields.
      • If you want users to specify a value for the property, click Required.
      • Select an agent pool to run the job from the Agent Pool list.
      • Select the job that sets the property value from the Job list.
      Note: Depending on the selected display type, some value-related fields might not be displayed.
  7. Click Save.