Aws-cdk: [aws-codepipeline-actions] Support for CodeStar Connections in GitHubSourceAction

Created on 1 Oct 2020  路  7Comments  路  Source: aws/aws-cdk

CodePipeline is recommending the use of the new CodeStar Connections when creating GitHub source actions. The GitHubSourceAction class doesn't currently support passing in a CodeStar Connection ARN.

Use Case

This would allow us to create GitHub sources that utilize the AWS Github Connector app. We can set this up via CloudFormation, but currently not via CDK. This would also have the side effect of enabling GitHub Enterprise Server connections within CDK.

Proposed Solution

Implement a new CodeStarSourceConnectionAction that mimics the parameters defined inhttps://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodestarConnectionSource.html

Other

The current GitHubSourceAction is working for us, but the new CodeStar Connection system would be a nice option, and more secure than using a machine account with a personal OAuth token.

  • [ ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

@aws-cdaws-codepipeline-actions efforsmall feature-request p2

Most helpful comment

Hey @akuma12 ,

actually, you can try using the (poorly name) BitBucketSourceAction even for GitHub - it actually should work!

Let me know if it does. If it turns out it does, we might think of renaming it to make it more obvious it works for both.

Thanks,
Adam

All 7 comments

Hey @akuma12 ,

actually, you can try using the (poorly name) BitBucketSourceAction even for GitHub - it actually should work!

Let me know if it does. If it turns out it does, we might think of renaming it to make it more obvious it works for both.

Thanks,
Adam

@skinny85 I never would have thought of that, I'll give it a whirl, thanks!

@skinny85 That seems to work. I had an issue at first with the Source action getting triggered by a push, but then just hanging, but it started working after I did a little tear down and redeploy. Thank you so much!

Sure 馃檪. Re-opening so we can track the re-naming work.

I started to migrate to using BitBucketSourceAction but noticed that AWS Codestar connections don't allow you to disable the trigger (ie: NONE, POLL, WEBHOOK that's available on the Github one).

I have a situation where I want to source a pipeline's code from Github, but I don't want to trigger the pipeline on a merge.

Is this a limitation of AWS Codestar or can anyone think of a fancy way to accomplish disabling the trigger without having to manage something like pushing code to S3 and sourcing from there?

If this is going to replace the GitHubSourceAction it would be nice if it would also emit the variables that are emitted by GitHubSourceAction.

Poorly named indeed XD

Thank you ! @skinny85

Was this page helpful?
0 / 5 - 0 ratings