I have a CodePipeline setup. But now I want to only have my Pipeline run when I trigger it manually, is that possible?
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.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With