在 Amazon CloudFormation 模板中触发筛选 - Amazon CodePipeline
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

在 Amazon CloudFormation 模板中触发筛选

您可以在中更新管道资源 Amazon 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