Skip to content

Add 'tc-branch-cleanup' skill for canceling TeamCity builds#1385

Merged
labkey-tchad merged 5 commits into
developfrom
fb_teamcityQueueCleanup
May 25, 2026
Merged

Add 'tc-branch-cleanup' skill for canceling TeamCity builds#1385
labkey-tchad merged 5 commits into
developfrom
fb_teamcityQueueCleanup

Conversation

@labkey-tchad
Copy link
Copy Markdown
Member

Rationale

After merging branches, there are often builds left queued on TeamCity. It would be handy to be able to clear out those builds so they don't consume TeamCity resources.
tc_branch_builds.py lists queued and running builds for a branch.
The tc-branch-cleanup leverages that script to cancel builds from a particular branch.

The script also works from the command line, without claude.

python3 .claude/scripts/tc_branch_builds.py my-branch --ids \
    | xargs -I{} teamcity run cancel {} --yes --comment "<comment>"

Related Pull Requests

  • N/A

Changes

  • Add script to list queued and running builds for a branch
  • Add 'tc-branch-cleanup' skill for canceling TeamCity builds

Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this to kill some builds that weren't needed. It worked but I had a couple of issues:

  1. It requires install of the TeamCity CLI. I didn't have it. I updated the guidance for getting it installed.
  2. It didn't find the feature branch because TeamCity doesn't use the fb_ prefix. I think this should be handled automatically when combined with the guidance in #1356

@labkey-tchad labkey-tchad merged commit 6966120 into develop May 25, 2026
7 checks passed
@labkey-tchad labkey-tchad deleted the fb_teamcityQueueCleanup branch May 25, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants