Start a pipeline in CodePipeline - 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).

Start a pipeline in CodePipeline

Each pipeline execution can be started based on a different trigger. Each pipeline execution can have a different type of trigger, depending on how the pipeline is started. The trigger type for each execution is shown in the execution history for a pipeline. Trigger types can depend on the source action provider as follows:

Note

You cannot specify more than one trigger per source action.

  • Pipeline creation: When a pipeline is created, a pipeline execution starts automatically. This is the CreatePipeline trigger type in the Execution history.

  • Changes on revised objects: This category represents the PutActionRevision trigger type in the Execution history.

  • Change detection on branch and commit for a code push: This category represents the CloudWatchEvent trigger type in the Execution history. When a change is detected to a source commit and branch in the source repository, your pipeline starts. This trigger type uses automated change detection. The source action providers that use this trigger type are S3 and CodeCommit. This type is also used for a schedule that starts your pipeline. See Start a pipeline on a schedule.

  • Polling for source changes: This category represents the PollForSourceChanges trigger type in the Execution history. When a change is detected to a source commit and branch in the source repository through polling, your pipeline starts. This trigger type is not recommended and should be migrated to use automated change detection. The source action providers that use this trigger type are S3 and CodeCommit.

  • Webhook events for third-party sources: This category represents the Webhook trigger type in the Execution history. When a change is detected by a webhook event, your pipeline starts. This trigger type uses automated change detection. The source action providers that use this trigger type are connections configured for code push (Bitbucket Cloud, GitHub, GitHub Enterprise Server, GitLab.com, and GitLab self-managed).

  • WebhookV2 events for third-party sources: This category represents the WebhookV2 trigger type in the Execution history. This type is for executions that are triggered based on triggers defined in the pipeline definition. When a release with a specified Git tag is detected, your pipeline starts. You can use Git tags to mark a commit with a name or other identifier that helps other repository users understand its importance. You can also use Git tags to identify a particular commit in the history of a repository. This trigger type disables automated change detection. The source action providers that use this trigger type are connections configured for Git tags (Bitbucket Cloud, GitHub, GitHub Enterprise Server, and GitLab.com).

  • Manually starting a pipeline: This category represents the StartPipelineExecution trigger type in the Execution history. You can use the console or the Amazon CLI to start a pipeline manually. For information, see Start a pipeline manually.

When you add a source action to your pipeline that uses automated change detection trigger types, the actions work with additional resources. Creating each source action is detailed in separate sections due to these additional resources for change detection. For details about each source provider and the change detection methods required for automated change detection, see Source actions and change detection methods.

Source actions and change detection methods

When you add a source action to your pipeline, the actions work with additional resources described in the table.

Note

The CodeCommit and S3 source actions require either a configured change detection resource (an EventBridge rule) or use the option to poll the repository for source changes. For pipelines with a Bitbucket, GitHub, or GitHub Enterprise Server source action, you do not have to set up a webhook or default to polling. The connections action manages change detection for you.

Source Uses additional resources? Steps
Amazon S3 This source action uses additional resources. When you use the CLI or CloudFormation to create this action, you also create and manage these resources. See Create a pipeline in CodePipeline and Amazon S3 source actions and EventBridge with Amazon CloudTrail
Bitbucket Cloud This source action uses a connection resource. See Bitbucket Cloud connections
Amazon CodeCommit Amazon EventBridge (recommended). This is the default for pipelines with an CodeCommit source created or edited in the console. See Create a pipeline in CodePipeline and CodeCommit source actions and EventBridge
Amazon ECR Amazon EventBridge. This is created by the wizard for pipelines with an Amazon ECR source created or edited in the console. See Create a pipeline in CodePipeline and Amazon ECR source actions and EventBridge resources.
GitHub or GitHub Enterprise Cloud This source action uses a connection resource. See GitHub connections
GitHub Enterprise Server This source action uses a connection resource and a host resource. See GitHub Enterprise Server connections
GitLab.com This source action uses a connection resource. See GitLab.com connections
GitLab self-managed This source action uses a connection resource and a host resource. See Connections for GitLab self-managed

If you have a pipeline that uses polling, you can update it to use the recommended detection method. For more information, see Update polling pipelines to the recommended change detection method.

If you want to turn off change detection for a source action that uses connections, see CodeStarSourceConnection for Bitbucket Cloud, GitHub, GitHub Enterprise Server, GitLab.com, and GitLab self-managed actions.