The Pipeline is not automatically triggered
TOC
Problem DescriptionRoot Cause AnalysisProblem InvestigationWebhook configuration was not setup correctlyEventLister not deployed or setup incorrectlyTrigger not configured correctlyProblem Description
After creating the Pipeline and Trigger using Pipelines functionality through the UI console, the Pipeline is not automatically triggered event though the event is sent (i.e the code is pushed).
Root Cause Analysis
There are several possible causes for this issue:
- The webhook configuration was not set up correctly.
- The
EventListenerwas not deployed, or is not listeningTriggersin the target namespace, or may be filtering out the event. - The
ServiceAccountused by theEventListenerdeployment does not have enough permissions. - The
Triggeris not configured correctly.
Problem Investigation
Given the possible issues mentioned above, follow the steps to find the root cause of the problem:
Webhook configuration was not setup correctly
- Access your repository/settings using an account with appropriate permissions.
- Check all webhook settings and confirm with the platform administrator details regarding the target address of the webhook.
- Make sure the required events are enabled by the webhook. For Gitlab events please refer to GitLab Event Triggers
EventLister not deployed or setup incorrectly
- Verify with the Platform Administrator that the
EventListenerwas deployed and can be reached from the event source (i.e Gitlab instance). - Access the
EventListenerresource and check if it is listeningTriggersin the target namespace checking theEventListenerresourcespec, it should have thenamespaceSelectorfield set to*or listing the target namespace. - Make sure that
interceptorsinsideEventListenerresource are not filtering out the event. - Check the
EventListenerlogs for any errors or warnings. This is possible through thekubectlcommand:kubectl logs <eventlistener-pod-name> -n <namespace> - Make sure the
ServiceAccountused by theEventListenerhas appropriate permissions, includingcreatepermissions for thePipelineRunresource.
For a detailed documentation on EventListener configuration please see EventListener
Trigger not configured correctly
- Verify that the
Triggerwas configured correctly, making sure the parameters fromTriggerBindingorClusterTriggerBindingmatch those used in theTriggerTemplate.
For a detailed documentation on how to setup Trigger using Gitlab events as example, please see Gitlab Events