Adding plug-in tasks to deployment plans

Plug-in tasks can interact with steps in installed plug-ins.

To add plug-in tasks to deployment plans, turn on the Plugin Task Support option on the System Settings page. By default, this feature is turned off.

Plug-in tasks work with the plug-ins that you install into IBM® UrbanCode™ Release. Plug-in tasks can interact with plug-in steps in several ways. First, plug-in tasks can send properties to external tools that are integrated with IBM UrbanCode Release. Second, plug-in can listen for IBM UrbanCode Release notification events and can respond by interacting with the REST API when the events occur. Plug-in task properties can be set when the integration runs, or when the plug-in task runs.

When a plug-in task runs, feedback can be recorded in the Comments tab. When the task completes, the plug-in can set the task status.

Note: You can also do most of these steps on the Execution and Deployment Plan page when you run a deployment. You can add tasks and segments to a deployment while the deployment is running. Changes that are made during a deployment are preserved in the deployment plan that is used for the deployment.
  1. From the IBM UrbanCode Release dashboard, click Releases & Deployments, and then click Deployment Plans.
  2. On the Deployment Plans page, click the name of the deployment.
  3. On the plan page, click Add Task for the segment where you want to add the task, and then select Plugin Task.
  4. In the Add Plug-in Task window, select a task from the Tasklist, and then click Save.
    The task is inserted into the segment and identified as a Plugin Task. In the Task list, tasks are identified by the plug-in name and the name of the plug-in step. For example, Demo Plugin - Execute Task. If a plug-in has more than one step that is used by plug-in tasks, each one is listed in the Task list.
  5. Optional: To change the task's estimated duration, complete these steps:
    1. Click the action icon for the task, and then select View/Edit.
    2. In the Edit Task window, in the Duration list, select a duration value for the task.
      The value represents an estimate of the number of minutes that are required to complete the task. You can also type a value for the duration.
    3. Click Save.
  6. Optional: To add a task tag to the task, complete these steps.
    1. In the Edit Task window, click the Task Tags icon, add task tags.
    2. In the Task Tags dialog box, select the tag.
      You can select multiple tags.
    3. Optional: To create a tag, click Edit Tags, and then click Add New.
      In the Name field, type a name for the tag, select a color, and then click Save.
    4. Click Save.
      The tag is added to the task.
    5. Optional: Click the Delete icon for a tag to remove it from the task.
    Tags can be viewed from deployment plan page. You have the option to view or hide task tags using the View Tags / Hide Tags toggle switch at the top of this page.
  7. Optional: Click Advanced, and then click Only Changed Versions to use only IBM™ UrbanCode Deploy component versions that changed since the last deployment.
  8. Optional: To restrict the task to application environments with specific environment tags, complete these steps:
    1. Click the action icon for the task, and then select View/Edit.
    2. In the Edit Task window, click Advanced.
      The task runs in any release environment with any of the selected tags. By default, all tags are selected.
    3. Click Match any selected tag, and then select tags.
      The task runs in any release environment with any of the selected tags. If no tags are selected, the task does not run.
    4. Click Match all selected tag, and then select tags.
      The task runs in any release environment with all of the selected tags. If no tags are selected, the task does not run.
    5. Click Save.
      The tag is added to the task.
  9. Optional: Click Advanced, and then, in the Plugin Properties box, enter one or more properties. Properties have the format: propertyName=propertyValue. Enter each property on a separate line.

    The number of properties in the task is defined by the plug-in. If you leave the Plugin Properties box empty or if you do not define all of the available properties, the property values are set by the plug-in integration.

  10. Optional: By default, tasks are available for all environments and all deployments that are associated with the release. To change this pattern, complete these steps:
    1. On the Edit Task page, click Environments.
    2. In the Pattern area, select one of these options to change the task frequency:
      • Always Run, to make the task available for every deployment.
      • Run Once Per Environment, to restrict the task to one deployment per environment.
    3. Select environments for the task.
      The task is active for the selected environments. By default, the task is active for every environment that is associated with the release. Tasks that are not active for an environment have the Not Applicable status, , when you deploy to an ineligible environment. You can override the status when you run a deployment by reopening the task.
  11. Optional: To add attachments to a task, complete the following steps:
    1. On the Add Task page, click Attachments, and then click Add Attachment.
    2. In the Add Attachment window, click Browse, and then select a file.
    3. Optional: In the Description field, describe the attached file.
    4. Click Save.
      The file is attached to the task and listed in the Attachments tab. To remove an attachment, click Delete.
    To see an attached file, click the file name. Depending on the file type, you are prompted to choose an application with which to open or view the file.

    By default, task attachments are stored in the ucr_installation/attachements directory. You can change the default location by modifying the attachments.folder.path property in the ucr_installation/conf/installed.properties file. For example, attachments.folder.path=/my_folder/my_attachments.

The plug-in step used by the task can create process feedback in the task's Comments tab. When the process finishes, the plug-in can set the task status.

For information about creating plug-ins that can be used with plug-in tasks, see Plug-in tasks.