スキップしてコンテンツを表示

CodeBuild-hosted GitLab runnerでWebhookが失敗する

0

CodeBuild-hosted GitLab runnerを公式ドキュメントの手順で設定したところ、GitLab上にWebhookは作成されましたが、パイプラインを実行しようとすると以下のエラーが発生しました。

{"message":"Invalid Webhook request received: Missing source repository"}

リクエストボディには以下の項目があるので、リポジトリは正しく送っているように見えます。

"repository": {
    "name": "{リポジトリ名}",
    "url": "git@{GitLabインスタンス}:{パス}/{リポジトリ名}.git",
    (以下省略)

使用しているGitLabはSelf-managedのGitLab Community Edition 15.11.6です。 CodeBuild-hosted GitLab runnerを使用するためにはバージョンが古すぎるのでしょうか?

質問済み 10ヶ月前217ビュー
1回答
0

The issue you're experiencing with your CodeBuild-hosted GitLab runner webhook failing with the error "Invalid Webhook request received: Missing source repository" could be due to several factors, but it's not likely related to your GitLab version being too old.

GitLab Community Edition 15.11.6 should be compatible with CodeBuild-hosted GitLab runners. The error suggests that there might be an issue with how the webhook is configured or how the repository information is being passed to CodeBuild.

Here are some troubleshooting steps you can try:

  1. Check the webhook settings in GitLab:
  • Verify that the webhook is properly enabled and configured to deliver the appropriate events, particularly the Workflow jobs events.
  • Review recent webhook deliveries in GitLab to see if there are specific error messages or response codes.
  1. Verify your CodeBuild project configuration:
  • Ensure that your CodeBuild project name in AWS matches exactly what you've specified in your .gitlab-ci.yml file.
  • Check that the tags section in your gitlab-ci.yml correctly points to your CodeBuild runner.
  1. Check webhook event filter groups:
  • Confirm that you have set the event type to WORKFLOW_JOB_QUEUED in your CodeBuild configuration.
  1. Examine network connectivity:
  • Ensure there are no network issues preventing GitLab from reaching your AWS CodeBuild endpoint.
  • Check if any network configurations or firewall rules might be blocking the connection.
  1. Review permissions:
  • Verify that CodeBuild has sufficient permissions to access your GitLab repository.
  • Check if your CodeBuild project's IAM role has the necessary permissions.

If the webhook continues to fail, you might need to manually re-enable it after addressing the underlying issues, as GitLab automatically disables webhooks after multiple failed attempts.
Sources
CodeBuild-hosted GitLab runner: webhook Failed to connect | AWS re:Post
Troubleshoot the webhook permission issues - AWS CodeBuild

回答済み 10ヶ月前

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

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

関連するコンテンツ