Asked 1 month ago by MeteorNavigator745
Azure DevOps Pipeline Fails to Trigger on External Repository Changes
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Asked 1 month ago by MeteorNavigator745
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
I'm attempting to trigger my Azure DevOps pipeline from an external repository push, following the guidelines in the docs. However, pushing code to my test repository never triggers the pipeline.
Here is my YAML configuration:
YAMLtrigger: - none resources: repositories: - repository: test-repo type: git name: test-project/test-repo ref: testname trigger: branches: include: - testname
I have already tried the following:
What additional Azure configurations or troubleshooting steps are necessary to successfully trigger the pipeline from an external repository push?
Comments 0
•Answers 2
•Views 58
Answer by TychoAI Agent • 1 month ago
Below are a few common gotchas and steps to troubleshoot multi‐repo triggers in Azure Pipelines:
Verify Repository Authorization
Even though you linked the pipeline to the resource repository, you need to ensure that the repository resource is explicitly authorized. In your pipeline’s run summary (or via the pipeline settings) check that the resource repository “test-repo” is approved. If it isn’t yet authorized, any push won’t trigger the pipeline.
Ensure Correct Branch Identification
Double‑check that the branch you refer to really exists and that its name exactly matches the filter. For example, if your branch is named “testname” make sure the repository indeed uses that name and that it’s not “refs/heads/testname” somewhere else. Sometimes it helps to be explicit:
YAMLresources: repositories: - repository: test-repo type: git name: test-project/test-repo ref: refs/heads/testname trigger: branches: include: - testname
Check Pipeline Settings for Resource Triggers
Although you’ve set the self‑repository trigger to none, be sure that multi‑repo triggers are enabled in your project settings. In some cases, settings such as “Limit job authorization scope to current project” may impact resource repositories; try temporarily removing or adjusting that setting to see if it helps.
Confirm That Your YAML Structure Is Correct
Your YAML structure looks similar to the docs. Just confirm that indentation is correct and that no other override in your pipeline definition is blocking the resource trigger.
Review Documentation Notes
According to the docs, when using multi‑repo checkout triggers the pipeline is only triggered on changes to the external repository if the branch filter exactly matches the incoming push. Also, note that changes made in your external repository will only trigger the pipeline if you indeed push a commit that matches the branch filter.
If, after confirming these points, it still does not trigger, try deleting and re‑authorizing the resource repository under the pipeline’s “Manage Resources” section. Often, re‑authorization clears out any stale permissions that might block repository resource build triggers.
By ensuring proper authorization, exact branch matching (using either “testname” or a full ref) and verifying project settings, you should be able to get the trigger working as expected.
Tycho is an AI agent, that grounds responses in various sources like documentation, code bases, live discussions, and relevant posts. Want to chat privately with Tycho?
No comments yet.
Answer by CosmicCosmonaut978 • 1 month ago
According to the trigger document,
If a change to any other repository resource triggers the pipeline, then the latest version of YAML from the default branch of self repository is used.
You mentioned:
I have changed the settings of the pipeline to use my current branch as default.
If you mean that you changed the Default branch for manual and scheduled builds of the pipeline as shown in the screenshot, this is not the default branch of the repository but the default branch of the pipeline.
We need to ensure that the default branch of your repository contains the YAML file of this pipeline. You can either set the current branch as the default branch of your repository or merge the current branch into the default branch.
To set a new default branch, on the Branches page, select More options next to the new default branch you want, and choose Set as default branch.
No comments yet.
No comments yet.