codepipeline: GitHubSourceAction should allow setup without polling or webhook
See original GitHub issuecodepipeline.GitHubSourceAction takes a ‘pollForSourceChanges’ setting. If it is true, codepipeline will poll github for changes. If it is false, then cdk will automatically create a webhook and configure the pipeline use it as a trigger.
This is almost always the right thing to do.
But if you want to trigger a pipeline on a schedule, it would be great to be able to create a pipeline with both of these triggers disable.
There is a workaround to achieve this:
new codepipeline.GitHubSourceAction(this, construct_base_name + 'GitHubSource', {
... other settings ...
// this is needed to prevent webhook creation, but we'll disable it later
pollForSourceChanges: true
})
const cfnPipeline = pipeline.node.findChild('Resource') as codepipeline.CfnPipeline cfnPipeline.addPropertyOverride('Stages.0.Actions.0.Configuration.PollForSourceChanges', false)
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
codepipeline: GitHubSourceAction should allow setup without ...
codepipeline.GitHubSourceAction takes a 'pollForSourceChanges' setting. If it is true, codepipeline will poll github for changes.
Read more >Appendix A: GitHub version 1 source actions
PollForSourceChanges controls whether CodePipeline polls the GitHub repository for source changes. We recommend that you use webhooks to detect source changes ...
Read more >Update a GitHub version 1 source action to a ... - 亚马逊云科技
With connections, CodePipeline no longer requires OAuth apps or personal access tokens to access your repository. When you create a connection, you install...
Read more >awslabs/aws-cdk - Gitter
You need to give CodePipeline permissions to your account in the region you're using it. It's a onetime action per GitHub account. You...
Read more >Integrating github actions with codepipeline/cdk - Medium
Back in the days, the github source action for CodePipeline was ... but you can alter codepipeline webhooks to respond to pretty much ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What’s wrong with making this option visible? I think it’s a perfectly viable option for people. We should obvsiouly default to the preferred option, but I don’t see any reason to be opinionated about which options are more “visible” as long as the API is clear
I’m also interested in this. We have some pipelines that only trigger on a schedule.