devopshq / devopshq/teamcity

VCS Trigger unexpectedly triggers all environment builds regardless of file-specific trigger rules

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I'm experiencing an issue with TeamCity VCS triggers where changes to specific environment files are causing all environment builds to trigger, despite having configured file-specific trigger rules.

## Current Setup:
- Multiple build configurations for different environments (prod-1, prod-2, dev-1, dev-2, staging)
- Each build configuration has specific file path triggers (e.g., `/env/prod/prod-1/env.hcl`)
- Using branch filter `+:pull/*` to include pull requests

## Expected Behavior:
When a change is made to `/env/prod/prod-1/env.hcl`, only the prod-1 build should trigger. Similarly, when a change is made to `/env/prod/prod-2/env.hcl`, only the prod-2 build should trigger.

## Actual Behavior:
When a change is made to any environment file (e.g., `/env/prod/prod-1/env.hcl`), all environment builds (prod-1, prod-2, dev-1, dev-2) are triggered. Only staging builds are correctly not triggering for some reason.

## Investigation:
I've found that the branch filter `+:pull/*` seems to be overriding the file-specific trigger rules, causing any PR to trigger all build configurations regardless of which files were changed.
I've tried the following without success:
- Adding exclusion rules: -`:/env/non-prod/dev-2/env.hcl -:/env/non-prod/dev-1/env.hcl`
- Various combinations of include/exclude rules
- Removing wildcards and using exact paths

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported behavior with the listed environment build configurations, file-specific rules, and `+:pull/*` branch filter. Compare which builds trigger for changes to each environment file; done means confirming and documenting behavior where only the matching environment build triggers, or identifying the relevant configuration limitation.

Written by the indexing model from the issue text.

Assessment

Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.