question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

codepipeline: GitHubSourceAction should allow setup without polling or webhook

See original GitHub issue

codepipeline.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:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
eladbcommented, Feb 4, 2019

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

0reactions
SanderKnapecommented, Apr 18, 2019

I’m also interested in this. We have some pipelines that only trigger on a schedule.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found