Branch Tracking Rules
Configure which Git branches can trigger builds and deployments for your project.
Branch Tracking Rules
Configure which Git branches can trigger builds and deployments for your project.
This guide covers branch-specific rules, default policies, and deployment rule changes.
About Deployment Policies
Branch tracking rules control how build pipelines respond when code is pushed to your repository. By default, a pushed branch can trigger a deployment unless project rules restrict it.
monolayer evaluates branch-specific rules before generic production or preview rules. Use branch-specific rules when one branch needs a different deployment policy.
Adding a Branch Rule
To create a rule for a specific branch and enable or disable deployments for one branch, you can use the branch tracking settings.
Before you start
You must know the exact branch name you want to manage.
Steps
- Click Projects in the global sidebar.
- Click your target project.
- Click Settings > Branch Tracking in the project sidebar.
- Type the branch name in the branch name field.
- Select Enable or Disable from the tracking mode pop-up menu.
- Click Add.
What happens next
The control plane adds the branch-specific rule and enforces it for future pushes.
Toggling a Policy
To change an existing policy state and toggle a branch tracking rule between enabled and disabled, you can use the rules list.
Before you start
The rule must already exist in the rules list.
Steps
- Locate the policy in the rules list.
- Select the status switch for that policy.
What happens next
The control plane saves the new policy state and applies it to future repository events.
Deleting a Branch Rule
To remove a branch-specific rule and return a branch to the default project deployment policy, you can use the branch tracking table.
Before you start
You must confirm that the branch no longer needs a custom rule.
Steps
- Locate the branch rule in the table.
- Click the trash icon in the actions column.
What happens next
The control plane deletes the rule and uses the default policy for that branch.