Filtering on push events (console) - Amazon CodePipeline
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Filtering on push events (console)

You can use the console to add filters for push events and include or exclude branches or file paths.

Filtering on push events (console)
  1. Sign in to the Amazon Web Services Management Console and open the CodePipeline console at http://console.www.amazonaws.cn/codesuite/codepipeline/home.

    The names and status of all pipelines associated with your Amazon account are displayed.

  2. In Name, choose the name of the pipeline you want to edit. Otherwise, use these steps on the pipeline creation wizard.

  3. On the pipeline details page, choose Edit.

  4. On the Edit page, choose the source action you want to edit. Choose Edit triggers. Choose Specify filter.

  5. In Event type, choose Push from the following options.

    • Choose Push to start the pipeline when a change is pushed to your source repository. Choosing this enables the fields to specify filters for branches and file paths or Git tags.

    • Choose Pull request to start the pipeline when a pull request is opened, updated, or closed in your source repository. Choosing this enables the fields to specify filters for destination branches and file paths.

  6. In Filter type, choose one of the following options.

    • Choose Branch to specify the branches in your source repository that the trigger monitors in order to know when to start a workflow run. In Include, enter patterns for branch names in glob format that you want to specify for the trigger configuration to start your pipeline on changes in the specified branches. In Exclude, enter the regex patterns for branch names in glob format that you want to specify for the trigger configuration to ignore and to not start your pipeline on changes in the specified branches. See Working with glob patterns in syntax for more information.

      Note

      If the include and exclude both have the same pattern, then the default is to exclude the pattern.

      You can use regex patterns in glob format to define your branch names. For example, use main.* to match all branches beginning with main.*. See Working with glob patterns in syntax for more information.

      For a push trigger, specify the branches you're pushing to, that is, the destination branches. For a pull request trigger, specify destination branches you're opening pull request to.

    • (Optional) Under File paths, specify file paths for your trigger. Enter the names in Include and Exclude as appropriate.

      You can use regex patterns in glob format to define your file path names. For example, use prod.* to match all file paths beginning with prod.*. See Working with glob patterns in syntax for more information.

    • Choose Tags to configure the pipeline trigger configuration to start with Git tags. In Include, enter patterns for tag names in glob format that you want to specify for the trigger configuration to start your pipeline on release of the specified tag or tags. In Exclude, enter the regex patterns for tag names in glob format that you want to specify for the trigger configuration to ignore and to not start your pipeline on release of the specified tag or tags. If the include and exclude both have the same tag pattern, then the default is to exclude the tag pattern.