0

I've set up a CodePipeline which automatically takes new commits on Github, builds them, and then deploys to EC2 instances.

This works well. However, since this is a web project I don't need to run build scripts for all commits made. I don't waste my time with it locally so I don't want to pay to waste it through AWS either.

My goal is to instruct CodeBuild to only build under certain conditions. I added a "build when PATH" setting to my project but it just builds all of the time anyway.

If I can't do this directly on CodeBuild can I (and does it make sense) to have branching logic in a CodePipeline?

I sometimes need to run NPM. Sometimes Composer. At times I run both and most often neither are run.

Any input is appreciated.

Josh Rodarte
  • 45
  • 1
  • 1
  • 3
  • Another approach is to use Github's webhooks directly and then have those call lambda through API Gateway and only launch a build when you want to. This would be outside of code pipeline. With code pipeline, you'll get some things as far as integration but you'll also give up some control of your pipeline. – jstewart379 Apr 17 '19 at 01:06
  • I've started going source > lambda > build > build > deploy. I'm fairly sure it is going to work but have had to divert for a bit. – Josh Rodarte Apr 18 '19 at 15:32

0 Answers0