I am currently looking to create a CI/CD workflow in AWS using AWS CodePipeline using AWS CodeBuild and AWS CloudFormation with Bitbucket Cloud as the SCM. I am looking to implement two pipelines for now in this workflow:
- On commit to a development branch. This would only happen when a PR has been created for the development branch to the trunk and the PR is still "Open"
- On merge of the PR (dev branch -> trunk)
What is it I am looking for?
I am looking for:
- An example of creating a connection between AWS CodePipeline and Bitbucket cloud in CloudFormation. I could find something similar for Github being the SCM. I am looking to try the same for Bitbucket cloud as well but just curious if anyone else has implemented something similar already.
- Because I have a CI workflow for a pull-request while it is still in "Open" state and the fact that I can have multiple dev branches and hence, multiple PRs could exist simultaneously. So, I would like to know if the CloudFormation configuration accepts any kind of naming pattern for the branch? for ex:
feat/**
PS: We are not looking to use bitbucket pipelines for various reasons such as limited number of triggers, not possible to skip certain manual steps in the pipeline, conditional checks on the outcome of certain steps on the pipeline and costs making it unsuitable.
Any pointers or examples on this would be highly appreciated.