2
votes

Well, I would like to avoid some types of commits to trigger an AWS CodePipeline, but I can't find any configuration about this in Source phase:

enter image description here

But, If AWS CodeBuild is not linked with AWS CodePipeline I have access to more features about trigger:

enter image description here

How can I configure trigger options using AWS CodePipeline ?

1

1 Answers

1
votes

You can do this by editing the CloudWatch Event for the pipeline. Using a Lambda function, you can look for a specific type of change in your commit. The example in the link below looks for changes to specific files - so if you change the readme.md file, for example, don't deploy.

https://aws.amazon.com/blogs/devops/adding-custom-logic-to-aws-codepipeline-with-aws-lambda-and-amazon-cloudwatch-events/

You could take this example further and look for specific flags in your commit message, for example.