在 AWS CloudFormation 模板中触发筛选 - AWS CodePipeline

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

在 AWS CloudFormation 模板中触发筛选

您可以在中更新管道资源 AWS CloudFormation 以添加触发器筛选。

以下示例模板片段为触发器字段定义提供了YAML参考。有关字段定义的列表,请参见管道中的触发器筛选 JSON (CLI)

pipeline: name: MyServicePipeline executionMode: PARALLEL triggers: - provider: CodeConnection gitConfiguration: sourceActionName: ApplicationSource push: - filePaths: includes: - projectA/** - common/**/*.js excludes: - '**/README.md' - '**/LICENSE' - '**/CONTRIBUTING.md' branches: includes: - feature/** - release/** excludes: - mainline - tags: includes: - release-v0 - release-v1 excludes: - release-v2 pullRequest: - events: - CLOSED branches: includes: - feature/** - release/** excludes: - mainline filePaths: includes: - projectA/** - common/**/*.js excludes: - '**/README.md' - '**/LICENSE' - '**/CONTRIBUTING.md' stages: - name: Source actions: - name: ApplicationSource configuration: BranchName: mainline ConnectionArn: arn:aws:codestar-connections:eu-central-1:111122223333:connection/fe9ff2e8-ee25-40c9-829e-65f85EXAMPLE FullRepositoryId: monorepo-example OutputArtifactFormat: CODE_ZIP