feat: add TeamCity CI/CD provider (pull + webhook, 96 unit tests)#6170
Open
chengyixu wants to merge 1 commit intokeephq:mainfrom
Open
feat: add TeamCity CI/CD provider (pull + webhook, 96 unit tests)#6170chengyixu wants to merge 1 commit intokeephq:mainfrom
chengyixu wants to merge 1 commit intokeephq:mainfrom
Conversation
Implements the TeamCity provider requested in keephq#4444. JetBrains TeamCity is a widely-used CI/CD server. Keep integrates via two modes: **Pull mode** — Keep polls TeamCity's REST API for failed (FAILURE) and cancelled (CANCELED) builds and surfaces them as alerts for unified incident correlation. Fetches up to 150 recent builds per cycle. **Webhook (push) mode** — TeamCity build events are forwarded to Keep via the Tcwebhooks plugin or a custom build step curl command. Auth supports Personal Access Tokens (TeamCity 2019.1+) and HTTP Basic auth (username + password). Severity: FAILURE → High, ERROR → Critical, CANCELLED → Warning, SUCCESS → Low. Status: FAILURE/ERROR/CANCELLED → FIRING, SUCCESS → RESOLVED. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the TeamCity provider requested in #4444.
TeamCity is a widely-used JetBrains CI/CD server used by thousands of engineering teams. This provider brings failed builds into Keep as alerts for unified incident correlation.
Two integration modes
Pull mode — Keep polls TeamCity's REST API (
/app/rest/builds) for failed (FAILURE) and cancelled (CANCELED) builds. Up to 150 recent builds are fetched per cycle and surfaced as alerts.Webhook (push) mode — TeamCity build events can be forwarded to Keep via:
curlAuth config
deployment_urlhttp://tc:8111)access_tokenusername+passwordverify_ssltrue)Severity + status mapping
Test coverage (96 tests)
_headers()and_auth()helpersvalidate_scopes: both scopes pass, API error returns error string_build_to_alert_dto: 11 status variants, 9 severity variants, name construction (project/build/number), description with status text + branch, identity fields (buildId, buildNumber, buildTypeId, buildName, projectName, branchName, url), label extraction, triggered-by, non-dict handling_parse_tc_datetime: TeamCity compact format (20240615T142300+0000), ISO string, Unix epoch, None/empty/bad inputs_format_alert: single build, list of builds, empty list, mixed valid/invalid, status preserved_get_alerts: failed builds, cancelled builds, combined results, API error, non-list response, alert severity and sourceCloses #4444
/claim #4444