Resolution
Duplicate builds are caused by duplicate webhooks on your git repo, created when different git integrations are used across triggers for the same repo. Standardize on a single git integration for all triggers on that repo, or manually delete the extra webhook(s) in your repo's webhook settings.
Symptom
A single push, PR, or other git action results in two or more builds triggering simultaneously, instead of one.
Cause
When you create a git trigger, you have to select which git integration to use. If you use a different git integration for one trigger and a different one for another trigger on the same repo, this causes multiple webhooks to be created on the git repo. When a git action occurs, Codefresh receives the webhook multiple times, which causes the build to trigger multiple times.
Diagnosis and fix
Confirm there are multiple webhooks
Navigate to your git repo's settings and check whether there are multiple webhooks pointing to Codefresh.
Option 1: Use a single git integration for triggers per repo (recommended)
Use a single git integration for all git triggers on a given repo. This way, Codefresh doesn't create multiple webhooks for that repo. Once you switch all triggers on the repo to a single git integration, Codefresh will automatically clean up the webhook associated with the other integration.
Option 2: Delete additional webhooks in the git repo
Delete the duplicate webhook(s) from your repo's webhook settings (e.g., GitHub → Settings → Webhooks), leaving only one webhook pointing to Codefresh.
Verify
- Confirm there is only one webhook pointing to Codefresh in your git repo's settings.
- Trigger a git action against your repo (e.g., a push).
- Confirm only a single build was triggered, not duplicates.