I am trying to configure my teamcity pipeline such that builds are only triggered when a PR for a feature/*
branch is targeting the master
branch, but I am unable to make it work.
In my VCS Root I’ve configured my default branch => refs/heads/master
then default branch specification is +:refs/pull/*/merge
I’ve also tried
+:refs/pull/*/merge
+:refs/heads/feature/*
VCS Root configuration
then I’ve configured a VCS Trigger with rule to ‘Trigger Build’ for all files ‘**’ using the attached VCS Root for this build pipeline. the Branch filder is
+:feature/*
+:pull/*/merge
also tried
+:refs/heads/feature/*
+:ref/pull/*/merge
VCS Trigger configuration
Teamcity version is “2023.05.6”
What I want to mention is that the pipeline does not trigger, using this configuration.
However if I in the VCS Root configure Branch Specification to refs/heads/*
it triggers, but it triggers not only on PR , but every time I push a new branch , or changes to existing branch.
locx is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.