Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I skip an AWS CodePipeline build?

I am currently developing a personal project on master. Every time I push to origin master a build is triggered on CodePipeline. As I am the only developer working on this project and don't want to bother with branches at this stage it would be nice to skip unnecessary builds. I wouldn't mind pushing to another branch, but it's a small annoyance.

CodeShip allows you to skip a build by including --skip-ci in your commit message. Is something like this possible with CodePipeline?

None of my Google searches have yielded results. The CodePipeline documentation makes no mention of such a feature either.

like image 752
Joe Hawkins Avatar asked Mar 07 '18 00:03

Joe Hawkins


People also ask

Can you skip build action while creating pipeline using AWS CodePipeline?

This step is optional if you have already created a build stage. On the Step 4: Add deploy stage page, do one of the following, and then choose Next: Choose Skip deploy stage if you created a build stage in the previous step. This option does not appear if you have already skipped the build stage.

How do I disable AWS CodePipeline?

To disable the AWS Codepipeline trigger for every code check in bitbucket, you have go to the SOURCE configuration (the bitbucket configuration) of your code pipeline, there will be a WebHook checkbox you will have to uncheck it.

What is build stage CodePipeline?

A stage might be a build stage, where the source code is built and tests are run. It can also be a deployment stage, where code is deployed to runtime environments. Each stage is made up of a series of serial or parallel actions.

What triggers CodePipeline?

Custom CloudWatch Events Rule to Trigger CodePipeline. When a change is introduced to the CodeCommit repository, the configured Lambda function receives an event from CloudWatch signaling that there has been a source change.


Video Answer


1 Answers

A valid reason for not wanting to build a certain commit is when you use CodeBuild to generate a commit for you. For example, I have some code on the master branch which passes all the tests. I then want to update the changelog, package.json version and create a git tag on a new commit and push it back to the CodeCommit repo.

If I do this on Codebuild, the version-commit triggers another build! Given the contents of the commit does not materially change the behaviour of the code, there is no need to build & test this commit.

Besides all of this, Amazon should be looking at the features in the marketplace and attempting to provide at least feature-parity. Adding a RegEx check for "skip-ci" to the CodeBuild trigger-code would take a few hours to implement, at most.

like image 77
uglow Avatar answered Sep 30 '22 14:09

uglow