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回答
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
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ