Adding automated deploy tasks to deployment plans

Automatic tasks run automatically and typically interact with IBM™ UrbanCode™ Deploy applications.

Automatic tasks represent IBM UrbanCode Deploy application processes. When an automatic task starts, the associated application process starts in IBM UrbanCode Deploy. Automatic tasks generate feedback in IBM® UrbanCode Release, and can apply status updates to the applications.

Applications are created by integrating with external products, such as IBM UrbanCode Deploy. For information about the IBM UrbanCode Deploy plug-in, see Integrating with IBM UrbanCode Deploy. The applications that you create with IBM UrbanCode Release do not have automatic tasks and are typically assigned to manual tasks. For information about creating applications, see Managing applications with the Applications page.

Automatic tasks can be created for any application that is assigned to the deployment plan's parent release. All application processes are available. If an application has several processes, say deploy and rollback types, each one is available and can be assigned to automatic tasks. An automatic task can be assigned a single application process; application processes can be assigned to multiple automatic tasks. For information about assigning applications to a release, see Creating releases and specifying release details.

Automatic tasks can be assigned applications that are versioned or unversioned. In IBM UrbanCode Release, application version refers to IBM UrbanCode Deploy application snapshots. You cannot directly assign an IBM UrbanCode Deploy component version to an automatic task. To deploy a component version, it must first be included in an application snapshot. If an application has several snapshots, you can select a specific snapshot or automatically use the most recent one. If you do not specify a snapshot, an automatic task that requires an application version is ineligible for the deployment and has a status of Not Applicable. For information about scheduling and running deployments, see Deploying.
Important: To use a versioned application in a deployment, the parent IBM UrbanCode Deploy application must have at least one snapshot.

Although most automatic tasks use versioned applications, you can assign unversioned applications to automatic tasks. For example, IBM UrbanCode Deploy applications that have configuration-type or operational-type processes typically do not use snapshots. You can set automatic tasks to use unversioned applications those process types.

Typically, automatic tasks are run in the release environment that is selected for deployment. You can restrict an automatic task to only run if the release environment has one or more environment tags. For information about environment tags, see Configuring release environments.

Automatic tasks start when the parent segment starts. If the execution pattern for the segment is sequential, automatic tasks start according to task order. Otherwise, automatic tasks, like manual tasks, start when the segment starts. An automatic task can have prerequisite tasks, in which case, it starts as soon as all prerequisite tasks are complete.

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 the Add Task icon for the segment to add the task to, and then select Automated Deploy Task.
  4. In the Add Automated Task dialog box, in the Task list, select the task.
    The automatic tasks for applications that are assigned to the release are available. For information about assigning applications to releases, see Creating releases and specifying release details. In this figure, two applications are assigned to the release, JPetStore, and WS Application. The application processes that are defined for the applications, 1 for JPetStore, and 2 for WS Application, are available.
    automated task selection
  5. Click Save.
    You can add more than one automatic task.
    The task is added to the end of the plan segment.
  6. 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.
  7. Optional: To configure the task to work with configuration-type and operational-type application processes, clear the Require application version check box.
    Typically, configuration-type and operational-type application processes do not use snapshots. If you clear this check box for deploy-type applications, the task deploys the most recent snapshot if the Only Changed Versions check box on the task's Advanced tab is cleared. Otherwise, the application process runs but does not deploy a snapshot. By default, the Require application version check box is selected.
  8. Optional: In the Description box, type or paste a description of the task.
    You can enter text, images, and links. A task is often done by someone who did not create the task. A clear and complete description can be especially useful.
  9. 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.
  10. Optional: Click Advanced, and then click Only Changed Versions to use only IBM UrbanCode Deploy component versions that changed since the last deployment.
  11. 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.
  12. Optional: Add or edit IBM UrbanCode Deploy properties to a task.
    Click Advanced and the UCD Process Properties table is displayed which lists the currently defined properties associated with the task.
    • To edit a task, click the edit icon ( ).
    • To add additional properties, click Add Properties. Enter the property name and value.
    Properties are available in IBM UrbanCode Deploy at the application scope.
    Note: This field is available if Set UCD Task Properties on the System Settings page is enabled.
  13. 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/ file. For example, attachments.folder.path=/my_folder/my_attachments.

  14. 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.
The task is added to the deployment plan at the bottom of the task list for the selected segment. The task is assigned a task number based on the segment and the task's position in the segment. Reposition a task by clicking and holding the mouse over the task and dragging it to another location. Tasks can be reordered within a segment or moved to other segments. After you move a task, the task numbers are updated to reflect the current task order.
Moving a task

To edit a task, click the action icon for the task, and then select View/Edit, . After a task starts, the Comments tab becomes available on the Edit Task window where you can view or add comments about the task. You can add dependencies between tasks. A task that depends on another task cannot start until the prerequisite task is resolved. To manage task dependencies, see Managing dependent tasks.