The pipeline source auto-sync feature is not available by default. To add and enable this feature, in the Core Services Configurations section in the Pipelines System YAML, add the tag
autoSyncResourceIfOutdated and set it as
This section provides information about the behavior of pipeline source auto-sync feature in various scenarios.
If the step in a pipeline is triggered as the result of an external event and if its input resources commit is not the latest, then that step fails in the ‘Processing required resources’ phase with the following error message:
Your GitRepo resource is outdated. We will sync the resource to the updated version shortly.
In this scenario, after the step completes, all git repo resources matching the same repo path, integration, and branch are auto-synced and the the failed step is automatically re-triggered (unless the
trigger tag is set to
Change in Config FIle
There could be cases where there is a change in the pipelines config file (yaml), but the webhook does not work. In this case, when the pipeline is manually triggered and it fails, the pipeline source, which is using the same branch, repo, and integration, is auto-synced.
To identify if the pipeline source needs to be synced, Pipelines checks if the latest SHA available for the resource matches the previous SHA of the webhook event. If they do not match, the pipeline source is auto-synced.
Trigger is Set to False
By default, any incoming payload from the webhook will trigger the execution of a step, but this can be changed by setting
trigger tag as
false. In this case, even after the pipeline source is auto-synced, it will not automatically trigger the step.
In such scenarios, you have to manually trigger the step or set the
trigger tag as