How do you integrate a CodeStar connection with Github status checks?

0

Other CI/CD solutions like Circle CI make it easy to set up a status check in Github, so that if a build fails, a branch can't be merged.

How can I do that in a CodeBuild / CodePipeline with a CodeStar connection?

feita há 10 meses605 visualizações
1 Resposta
1

Please note that it is currently not possible to integrate a CodeStar connection with Github status checks. That said, I have raised an internal feature request with my internal team for this use-case. Unfortunately, I am not in position to provide you with ETA as we do not have visibility into service release timelines. Therefore, I would suggest you to monitor the following pages, where AWS advertises all the new feature releases:

What’s New: http://aws.amazon.com/new/
AWS blogs: https://aws.amazon.com/blogs/aws/

To achieve your requirement, you can use any of the below two workarounds.

Option 1 : [Recommend] Use CodeBuild directly which provides a feature to report build statuses to source provider.

  1. Create build project with source GitHub and while configuring source select option, “Report build statuses to source provider when your builds start and finish”. Then, Using Webhook and event filter you can trigger build based on “PULL_REQUEST_CREATED”. I am attaching screenshot at the end for your reference.

  2. In case, if you have other actions to be performed based on the build output then you can chose to send the build output artifact to S3. To achieve this you have to include artifact section in your buildspec. Refer [2] for example buildspec.

  3. Now, create a CodePipeline with source as S3 ( Build Output Artifact S3 ) and include other actions/stages that needs to be performed on your build code.

Current setup : CodeStar Connection -> CodeBuild -> Some other actions Suggestion :

  • Create CodeBuild project separately with GitHub and webhook.
  • Create CodePipeline with S3 as Source ( Build Output Artifact S3 bucket ) -> Some other actions.

[2] Additionally, you can implement custom solution as discussed in our AWS blog [3] through integration of Codepipeline, SNS and Lambda to report status to GitHub. Please refer [3] for detailed steps.

Reference:

[1] https://aws.amazon.com/es/blogs/devops/aws-codepipeline-build-status-in-a-third-party-git-repository/
[2] https://docs.aws.amazon.com/codebuild/latest/userguide/getting-started-cli-create-build-spec.html
[3] https://aws.amazon.com/es/blogs/devops/aws-codepipeline-build-status-in-a-third-party-git-repository/

Enter image description here Enter image description here

AWS
ENGENHEIRO DE SUPORTE
respondido há 10 meses
profile picture
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas