Codebuild - How to trigger a build from an outbound webhook from external system not (bitbucket, github, gitlab)

0

We just started to replace our bitbucket pipelines for AWS Codebuild. One feature common to Bitbucket Pipeline and GitHub Actions, is there's an API to trigger a build.

This is quite useful when outbound webhooks fire from external system events not coming from the source control provider.

As an example, we are using pact.io for contract testing. The pact broker will fire a webhook to trigger a build when a certain event occurs. Pact.io has lots of documentation for CI build tools and this is easily replicated when using bitbucket pipelines or github actions. However, I cannot seem to locate any documentation on how to trigger a Codebuild from an API Request. See pact webhook templates for trigger_build examples of many CI tools, https://docs.pact.io/pact_broker/webhooks/template_library.

How can triggering a build be easily done with AWS Codebuild?

質問済み 2年前954ビュー
1回答
0

You can use StartBuild API in CodeBuild to start a build programmatically. Other API actions can be found in the same documentation. If a client has IAM credentials to make the API call, you can use CLI/SDK to make that API call. If not, you can consider building an API in API Gateway as a proxy for that CodeBuild API. See this article for reference.

AWS
Taka_M
回答済み 2年前
  • StartBuild API is not quite useful for this case without an example HTTP POST.
    The other option of building an API in API Gateway as a proxy seems overly complicated for the parity with other build tools.

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

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

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

関連するコンテンツ