admin管理员组

文章数量:1410705

I am configuring a Continuous Deployment (CD) trigger in Azure DevOps and need to exclude pull request branches (refs/pull/) from triggering new releases. However, after applying this exclusion, new releases are also not being triggered for branches matching feature/.

My current setup: I added refs/pull/* to the exclusions to prevent deployments from PR-related branches. After this change, releases no longer trigger for feature/* branches, even though they should. What I expected: Excluding refs/pull/* should prevent releases from PRs. feature/* branches should still trigger new releases as expected. Question: Is there a known issue with excluding refs/pull/* affecting other branch patterns? How can I properly exclude pull request branches without impacting feature/* triggers? Any insights or alternative configurations would be appreciated!

I am configuring a Continuous Deployment (CD) trigger in Azure DevOps and need to exclude pull request branches (refs/pull/) from triggering new releases. However, after applying this exclusion, new releases are also not being triggered for branches matching feature/.

My current setup: I added refs/pull/* to the exclusions to prevent deployments from PR-related branches. After this change, releases no longer trigger for feature/* branches, even though they should. What I expected: Excluding refs/pull/* should prevent releases from PRs. feature/* branches should still trigger new releases as expected. Question: Is there a known issue with excluding refs/pull/* affecting other branch patterns? How can I properly exclude pull request branches without impacting feature/* triggers? Any insights or alternative configurations would be appreciated!

Share asked Mar 4 at 7:57 LiorRabanLiorRaban 113 bronze badges 1
  • Have tried the suggestions mentioned in my answer below? I'd like to know if any if the suggestions can work for you. @LiorRaban – Bright Ran-MSFT Commented Mar 21 at 2:37
Add a comment  | 

1 Answer 1

Reset to default 0

I attempted with the same configuration of CD trigger (Continuous deployment trigger), and it can only prevent the builds of pull request branches (refs/pull/*) from triggering new releases. For other branches, the new releases can be triggered as expected.

Build branch filters:
Exclude refs/pull/*


For your case:

  1. If you want the new releases can be triggered only for the builds of branches under the feature/ folder, you can set the CD trigger like as below.

    Build branch filters:
    Include feature/*
    

  2. If you want the new releases can be triggered for the builds of any branches except pull request branches, you can set the CD trigger like as below.

    Build branch filters:
    Include *
    Exclude refs/pull/*
    

I have tested above ways, all of them can trigger new releases for branches feature/*, and not trigger for pull request branches.


本文标签: