Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I make my CodePipeline only executed when triggered manually

I have a CodePipeline setup. But now I want to only have my Pipeline run when I trigger it manually, is that possible?

like image 578
Jiew Meng Avatar asked Nov 04 '18 03:11

Jiew Meng


People also ask

How do I manually run CodePipeline?

Start a pipeline manually (console)Sign in to the AWS Management Console and open the CodePipeline console at http://console.aws.amazon.com/codesuite/codepipeline/home . In Name, choose the name of the pipeline you want to start. On the pipeline details page, choose Release change.

How can you automate AWS CodePipeline execution?

Your pipeline runs automatically only when something changes in the source repository and branch that you have defined. Manually: You can use the console or the AWS CLI to start a pipeline manually. For information, see Start a pipeline manually. On a schedule: You can set up a schedule that starts your pipeline.


1 Answers

This worked for me:

Set up a regular pipeline with Github webhook set. This will create and register an internal aws webhook. Then simply deregister and remove the webhooks like it is written in the aws docs via aws-cli.

Adjust the following to your region, mine is us-east-2:

Find out the name of the webhook:

aws codepipeline list-webhooks

De-register:

aws codepipeline deregister-webhook-with-third-party --webhook-name <webhook-name>

Delete:

aws codepipeline delete-webhook --name <webhook-name>

Note: It's necessary to have the source step configured to use the Github webhook.

Now you can trigger your pipeline manually via AWS Console or via aws-cli with:

aws codepipeline start-pipeline-execution --name <pipeline-name>
like image 138
Yannick Schuchmann Avatar answered Sep 19 '22 07:09

Yannick Schuchmann