Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codepipeline_actions: No way to add CodeConnection source #30957

Open
2 tasks
revmischa opened this issue Jul 26, 2024 · 6 comments
Open
2 tasks

codepipeline_actions: No way to add CodeConnection source #30957

revmischa opened this issue Jul 26, 2024 · 6 comments
Labels
@aws-cdk/aws-codepipeline-actions effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@revmischa
Copy link
Contributor

Describe the feature

I'm trying to set up CodePipeline with a GitHub source. I think this is a common flow.
I see that there is a GitHubSourceAction construct but it's not what I want - it wants an oauth secret. But now in the console we can go set up a "CodeConnection" to link GItHub to AWS without having to store an oauth token somewhere in secrets manager. I'd like to use that existing connection someone has created.

I found the L1 construct I want, but have no way to use it as a Source Action in CodePipeline: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codeconnections.CfnConnection.html

Please add support for a CodeConnections Source Action.

Use Case

I think my use case is pretty common: using GitHub with CodePipeline.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.150.0

Environment details (OS name and version, etc.)

Linux

@revmischa revmischa added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 26, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 26, 2024
@khushail
Copy link
Contributor

@revmischa , yes, having CodeConnection source would be useful as we already have CodeStarConnection as source in CDK. Thanks for requesting this!

@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jul 26, 2024
@ishon19
Copy link

ishon19 commented Jul 29, 2024

Hi @khushail, I would like to work on this issue!

@khushail
Copy link
Contributor

Hey @ishon19 , thanks for volunteering for the contribution of PR. Here is the contribution guide to get started on the process.
Once your PR is ready, you could reach out to cdk.dev community for review.

@ishon19
Copy link

ishon19 commented Jul 29, 2024

Hey @ishon19 , thanks for volunteering for the contribution of PR. Here is the contribution guide to get started on the process. Once your PR is ready, you could reach out to cdk.dev community for review.

Absolutely, thanks @khushail!

@chetancyberoi
Copy link

Any updates, I am basically stuck here

@zytalus
Copy link

zytalus commented Aug 28, 2024

How to use Code Connection with AWS CDK CI/CD Pipeline.

Create a AWS Code Connection by following steps here https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html

Replace CodePipelineSource.gitHub with CodePipelineSource.connection

Example*

    const pipeline = new CodePipeline(this, 'MyPipeline', {
      pipelineName: 'MyPipeline',
      synth: new ShellStep('Synth', {
        input: CodePipelineSource.connection('OWNER/REPO', 'main', {
          connectionArn: 'arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh'
        }),
        commands: ['npm ci', 'npm run build', 'npx cdk synth']
      })
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codepipeline-actions effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants