Creating a workflow - Amazon CodeCatalyst

Creating a workflow

A workflow is an automated procedure that describes how to build, test, and deploy your code as part of a continuous integration and continuous delivery (CI/CD) system. A workflow defines a series of steps, or actions, to take during a workflow run. A workflow also defines the events, or triggers, that cause the workflow to start. To set up a workflow, you create a workflow definition file using the CodeCatalyst console's visual or YAML editor.

Tip

For a quick look at how you might use workflows in a project, create a project with a blueprint. Each blueprint deploys a functioning workflow that you can review, run, and experiment with.

Use the following procedures to create a workflow in CodeCatalyst.

For more information about workflows, see Build, test, and deploy with workflows in CodeCatalyst.

Visual
To create a workflow using the visual editor
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Choose your project.

  3. In the navigation pane, choose CI/CD, and then choose Workflows.

  4. Choose Create workflow.

    The Create workflow dialog box appears.

  5. In the Source repository field, choose a source repository where the workflow definition file will reside. The file will be stored in the ~/.codecatalyst/workflows/ folder in the chosen repository. If no source repository exists, create one.

  6. In the Branch field, choose a branch where the workflow definition file will reside.

  7. Choose Create.

    Amazon CodeCatalyst saves the repository and branch information in memory, but the workflow is not yet committed.

  8. Choose Visual.

  9. Build the workflow:

    1. (Optional) In the workflow diagram, choose the Source and Triggers box. A Triggers pane appears. Choose Add trigger to add a trigger. For more information, see Adding a push, pull, or schedule trigger.

    2. Choose + Actions (top-left). The Actions catalog appears.

    3. Choose the plus sign (+) inside an action to add it to the workflow. Use the pane on the right to configure the action. For more information, see Adding an action to a CodeCatalyst workflow.

    4. (Optional) Choose Workflow properties (top-right). A Workflow properties pane appears. Configure the workflow name run mode, and compute. For more information, see Configuring the queuing behavior of runs and Configuring the compute and runtime environment Docker images for a workflow.

  10. (Optional) Choose Validate to validate the workflow's YAML code before committing.

  11. Choose Commit, and on the Commit workflow dialog box, do the following:

    1. For Workflow file name, leave the default name or enter your own.

    2. For Commit message, leave the default message or enter your own.

    3. For Repository and Branch, choose the source repository and branch for the workflow definition file. These fields should be set to the repository and branch that you specified earlier in the Create workflow dialog box. You can change the repository and branch now, if you'd like.

      Note

      After committing your workflow definition file, it cannot be associated with another repository or branch, so make sure to choose them carefully.

    4. Choose Commit to commit the workflow definition file.

YAML
To create a workflow using the YAML editor
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Choose your project.

  3. In the navigation pane, choose CI/CD, and then choose Workflows.

  4. Choose Create workflow.

    The Create workflow dialog box appears.

  5. In the Source repository field, choose a source repository where the workflow definition file will reside. The file will be stored in the ~/.codecatalyst/workflows/ folder in the chosen repository. If no source repository exists, create one.

  6. In the Branch field, choose a branch where the workflow definition file will reside.

  7. Choose Create.

    Amazon CodeCatalyst saves the repository and branch information in memory, but the workflow is not yet committed.

  8. Choose YAML.

  9. Build the workflow:

    1. (Optional) Add a trigger to the YAML code. For more information, see Adding a push, pull, or schedule trigger.

    2. Choose + Actions (top-left). The Actions catalog appears.

    3. Choose the plus sign (+) inside an action to add it to the workflow. Use the pane on the right to configure the action. For more information, see Adding an action to a CodeCatalyst workflow.

    4. (Optional) Choose Workflow properties (top-right). A Workflow properties pane appears. Configure the workflow name, run mode, and compute. For more information, see Configuring the queuing behavior of runs and Configuring the compute and runtime environment Docker images for a workflow.

  10. (Optional) Choose Validate to validate the workflow's YAML code before committing.

  11. Choose Commit, and on the Commit workflow dialog box, do the following:

    1. For Workflow file name, leave the default name or enter your own.

    2. For Commit message, leave the default message or enter your own.

    3. For Repository and Branch, choose the source repository and branch for the workflow definition file. These fields should be set to the repository and branch that you specified earlier in the Create workflow dialog box. You can change the repository and branch now, if you'd like.

      Note

      After committing your workflow definition file, it cannot be associated with another repository or branch, so make sure to choose them carefully.

    4. Choose Commit to commit the workflow definition file.