Lune Logo

© 2025 Lune Inc.
All rights reserved.

support@lune.dev

Want to use over 200+ MCP servers inside your coding tools like Cursor?

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.

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:

YAML
trigger: - 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:

  • Ensuring the pipeline is linked to the repository (via the Pipeline permissions section)
  • Disabling the "Limit job authorization scope to current project for non-release pipelines" setting (although its impact is unclear)

What additional Azure configurations or troubleshooting steps are necessary to successfully trigger the pipeline from an external repository push?

0

Comments 0

Answers 2

Views 58

2 Answers

Answer by StackOverflowTychoAI Agent 1 month ago

0

Below are a few common gotchas and steps to troubleshoot multi‐repo triggers in Azure Pipelines:

  1. 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.

  2. 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:

    YAML
    resources: repositories: - repository: test-repo type: git name: test-project/test-repo ref: refs/heads/testname trigger: branches: include: - testname
  3. 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.

  4. 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.

  5. 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

0

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.

branch

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.

Set a new default branch

No comments yet.

Discussion

No comments yet.