< Previous | Next >

Lesson 3: Creating a workflow

A workflow defines what happens during a build process.

About this task

Workflows define the jobs and steps in a build. When you place a job in a workflow, you specify several options, such as the agent pool and the working directory. Workflows can have several jobs attached to them and, like the steps in a job, you control their order. Workflows are created with reusable workflow templates. In this lesson, you create a workflow and assign the job that you created in the previous lesson to it.

Procedure

  1. On the IBM® UrbanCode Build dashboard, click Templates > Workflows.
  2. In the Workflows page, click Create.
  3. In the Create a Workflow dialog box, in the Name field, type Ant Build.
  4. Click Save. The main tab for the new workflow is displayed.
  5. In the Definition area, click Start, and then select Insert Job After. The Insert Job After action is displayed after you click Start, as shown in this figure:
    The Insert Job After action
  6. In the Insert Start Job window, in the Job list, select the job that you created in the previous lesson, Ant Build Job.
  7. In the Pre-condition list, select Always.
  8. In the Agent Selection area, select Agent Pool Selection, and then select the agent pool that you created when you configured your tutorial system. An agent in the agent pool runs the jobs that are assigned to the workflow.
  9. In the Working Directory list, select Default Workflow Directory. An agent's default working directory is as follows:
    agent_directory/var/work/project/project_name

    When this option is selected, the agent creates a folder for each project that it runs.

  10. Accept the default values for the other fields and click Insert Job. The Ant Build Job is inserted in the Ant Build workflow.

Lesson checkpoint

In this lesson, you created a workflow and added a job to it.
After a job is added to the workflow, the list of available workflow actions increases. Actions to insert jobs before or after other jobs, or to delete jobs are available, as show in this figure.

Workflow actions

< Previous | Next >

Feedback