We're using TeamCity, and I've set up jobs to pull from branches. But when those branches are deleted they still appear in Teamcity:
(List of outdated branches, but only refs/master
is actually active)
The Teamcity documentation actually specifies what constitutes an active branch:
Active branches
In a build configuration with configured branches, the Overview page shows active branches.
A number of parameters define whether a branch is active. The parameters can be changed either in a build configuration (this will affect one build configuration only), project, or in the internal properties (this defines defaults for the entire server). A parameter in the configuration overrides a parameter in the internal properties.
A branch is considered active if:
- it is present in the VCS repository and has recent commits (i.e. commits with the age less than the value of
teamcity.activeVcsBranch.age.days
parameter, 7 days by default).- or it has recent builds (i.e. builds with the age less than the value of
teamcity.activeBuildBranch.age.hours
parameter, 24 hours by default).- ! A closed VCS branch with builds will still be displayed as active during 24 hours after last build. To remove closed branches from display, set
teamcity.activeBuildBranch.age.hours=0
.
But... I don't understand their description! :) What do they mean with "parameters in the configuration"? I've tried making parameters in my jobs like so:
(Adding parameter teamcity.activeBuildBranch.age.hours
)
But that doesn't do anything. Maybe I'm exposing myself as a total TC noob, but can anyone guide me through how to correctly alter these settings so I only show repository-active branches in my build jobs?