How to trigger CodePipeline from GitHub

0

Hi,

I am trying to get my CDK Stacks deployed automatically via CodePipeline. The pipeline works but it won't get triggered from any commits on my GitHub Repository.

I've created an issue for that: https://github.com/aws/aws-cdk/issues/18656

Basically the code looks like that

    const githubConnection = pipelines.CodePipelineSource.connection(
      "org/repo",
      "main",
      {
        connectionArn: ARN
        triggerOnPush: true,
      }
    );

    const pipeline = new pipelines.CodePipeline(this, "CdkPipeline", {
      synth: new pipelines.ShellStep("Synth", {
        input: githubConnection,
        installCommands: ["yarn install --frozen-lockfile"],
        commands: ["npx cdk synth"],
      }),
    });
  • Try revoking the AWS Connector for Github and resetting up the connection. But it sounds like you can manually start the pipeline.

    I just went through this creating a workshop for this setup a couple weeks ago... I can try it again. You are using v2.8.0. Which region are your in? Anything special with your github account?

1 Answer
2

We have seen issues in the past where the casing of the repository as configured in CodePipeline does not match the casing of the repository in GitHub or Bitbucket, and as a result, pipelines were not being properly triggered - even though using "Release Changes" would work.

One suggestion would be to edit the Source action in the AWS Console and use the name of the repository as it appears in the dropdown that appears when configuring the source action - for other customers this has resolved the issue.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions