TE

teamcity-monitor

CI/CD pipeline monitor for TeamCity, focused on MikoPBX builds and test analysis.

Install

mkdir -p .claude/skills/teamcity-monitor && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2846" && unzip -o skill.zip -d .claude/skills/teamcity-monitor && rm skill.zip

Installs to .claude/skills/teamcity-monitor

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Мониторинг CI/CD пайплайна MikoPBX в TeamCity. Получение статусов сборок, анализ упавших тестов, доступ к логам и артефактам. Использовать после push в git или при анализе проблем сборки.
187 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Monitor multi-stage CI/CD pipelines
  • Fetch stack traces for failed test runs
  • Download build artifacts via SSH
  • Retrieve CI build logs
  • Verify status across pipeline stages

How it works

Calls the TeamCity REST API using authentication tokens to aggregate build status and test occurrence data.

Inputs & outputs

You give it
Build ID or pipeline stage name
You get back
Status summary or log snippet

When to use teamcity-monitor

  • Checking build status of pipeline stages
  • Debugging failed test cases
  • Analyzing CI/CD build logs
  • Accessing test build artifacts

About this skill

TeamCity Build Pipeline Monitor

Monitor MikoPBX CI/CD pipeline status, analyze failed tests, and access build artifacts.

What This Skill Does

  • Checks build status across the entire pipeline (5 stages)
  • Retrieves detailed information about failed tests with stack traces
  • Downloads build logs for analysis
  • Accesses test artifacts via SSH to build agent
  • Provides actionable insights for fixing failures

Pipeline Overview

T2NativeInDocker → IncrementBuild → 172163272img → RestAPITests
                                                 → TESTCASES (UI)

Build Chain:

  1. Mikopbx_T2NativeInDocker - Base system build (T2 Linux)
  2. Mikopbx_IncrementBuild - MikoPBX distribution build
  3. Mikopbx_172163272img - Deploy to test server 172.16.33.72
  4. Mikopbx_RestAPITestsOn172163272 - REST API tests (pytest)
  5. MIKOPBX_TESTCASES - UI tests (BrowserStack)

Environment Requirements

# Required environment variable
TEAMCITY_TOKEN  # Bearer token for TeamCity API

# SSH access to build agent (for artifacts)
ssh [email protected]

Quick Commands

Check All Build Statuses

TEAMCITY_URL="https://teamcity.miko.ru"

for bt in Mikopbx_T2NativeInDocker Mikopbx_IncrementBuild Mikopbx_172163272img Mikopbx_RestAPITestsOn172163272 MIKOPBX_TESTCASES; do
  echo "=== $bt ==="
  curl -s -H "Authorization: Bearer $TEAMCITY_TOKEN" -H "Accept: application/json" \
    "$TEAMCITY_URL/app/rest/builds?locator=buildType:(id:$bt),branch:develop,count:1&fields=build(id,number,status,state,statusText,finishDate)"
  echo
done

Get Failed Tests Details

BUILD_ID=35133  # Replace with actual build ID

curl -s -H "Authorization: Bearer $TEAMCITY_TOKEN" -H "Accept: application/json" \
  "$TEAMCITY_URL/app/rest/testOccurrences?locator=build:(id:$BUILD_ID),status:FAILURE&fields=testOccurrence(name,status,details,duration)"

Download Build Log

BUILD_ID=35133

curl -s -H "Authorization: Bearer $TEAMCITY_TOKEN" \
  "$TEAMCITY_URL/downloadBuildLog.html?buildId=$BUILD_ID" > build.log

Analyzing Failed Tests

Step 1: Get Build ID

# Get latest failed build for RestAPI tests
curl -s -H "Authorization: Bearer $TEAMCITY_TOKEN" -H "Accept: application/json" \
  "$TEAMCITY_URL/app/rest/builds?locator=buildType:(id:Mikopbx_RestAPITestsOn172163272),branch:develop,status:FAILURE,count:1&fields=build(id,number,statusText)"

Step 2: Get Failed Test List

BUILD_ID=35133

curl -s -H "Authorization: Bearer $TEAMCITY_TOKEN" -H "Accept: application/json" \
  "$TEAMCITY_URL/app/rest/testOccurrences?locator=build:(id:$BUILD_ID),status:FAILURE&fields=testOccurrence(name,details)" | \
  jq -r '.testOccurrence[] | "❌ \(.name)\n\(.details)\n---"'

Common Failure Patterns

Error PatternLikely CauseAction
database is lockedConcurrent DB accessCheck for parallel tests
409 ConflictDuplicate entityClean test data or use unique IDs
404 Not FoundResource deleted mid-testCheck test isolation
AssertionErrorLogic/API response issueReview test expectations

Accessing Build Agent Artifacts

SSH access provides direct access to test workspace.

Find Work Directory

ssh [email protected] "cat /opt/buildagent/work/directory.map | grep RestAPI"
# Output: bt166=MIKOPBX::RestAPI tests -> a126da2f62f4ba7b

Access Test Sources

WORK_DIR="a126da2f62f4ba7b"

# View specific test file
ssh [email protected] "cat /opt/buildagent/work/$WORK_DIR/Core/tests/api/test_09_custom_files.py"

# List test directory
ssh [email protected] "ls -la /opt/buildagent/work/$WORK_DIR/Core/tests/api/"

Directory Structure on Agent

/opt/buildagent/work/
├── directory.map           # BuildType → directory mapping
├── a126da2f62f4ba7b/       # RestAPI tests workspace
│   └── Core/
│       └── tests/
│           ├── api/        # Python pytest tests
│           ├── AdminCabinet/  # PHP Selenium tests
│           └── pycalltests/   # SIP call tests
└── [other workspaces]/

Common Workflows

After Push: Check Pipeline Status

  1. Wait 2-3 minutes for build chain to start
  2. Run status check for all 5 buildTypes
  3. If FAILURE, get failed tests details
  4. Analyze error patterns and fix

Debugging Specific Test Failure

  1. Get build ID from status check
  2. Retrieve failed test details with stack trace
  3. SSH to agent to view full test source
  4. Check test data setup and assertions

Investigating Build Failure (not tests)

  1. Download full build log
  2. Search for "ERROR", "fatal error", "Aborted"
  3. Check build step that failed
  4. Review docker/compilation issues

API Reference

EndpointMethodDescription
/app/rest/serverGETServer info and version
/app/rest/builds?locator=...GETQuery builds
/app/rest/testOccurrences?locator=...GETQuery test results
/downloadBuildLog.html?buildId=XGETFull build log

Useful Locators

buildType:(id:XXX)           # Filter by build configuration
branch:develop               # Filter by branch
status:FAILURE               # Only failed builds
count:1                      # Limit results
state:finished               # Only completed builds

Troubleshooting

Authentication Error

Invalid authentication request

IMPORTANT: The TEAMCITY_TOKEN is a permanent token that does NOT expire.

Debugging steps:

  1. First, verify token works with simple endpoint:
    curl -s "https://teamcity.miko.ru/app/rest/server" \
      -H "Authorization: Bearer $TEAMCITY_TOKEN" \
      -H "Accept: application/json"
    
  2. If server responds with JSON, token is valid - check your query syntax
  3. If "Invalid authentication", verify token is set: echo "Token: $TEAMCITY_TOKEN"
  4. Never suggest regenerating the token - it's permanent

Empty Response

{"build":[]}

Cause: No builds match locator (wrong branch, no recent builds). Fix: Try without branch filter or check buildType ID.

SSH Connection Failed

Permission denied (publickey)

Fix: Ensure SSH key is added to [email protected].

When not to use it

  • Deploying code to production
  • Managing repository branch security

Prerequisites

TEAMCITY_TOKENSSH access to build agents

Limitations

  • Limited to existing TeamCity build configurations
  • Requires network access to the TeamCity server

How it compares

Provides automated, centralized access to pipeline telemetry instead of manual browser-based dashboard checks.

Compared to similar skills

teamcity-monitor side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
teamcity-monitor (this skill)17moReviewIntermediate
mlops-engineer34moNo flagsAdvanced
senior-devops77moReviewAdvanced
genkit-infra-expert127dReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

sqlite-inspector

mikopbx

Проверка консистентности данных в SQLite баз данных MikoPBX после операций REST API. Использовать при валидации результатов API, отладке проблем с данными, проверке связей внешних ключей или инспектировании CDR записей для тестирования.

568

log-analyzer

mikopbx

Анализ логов Docker контейнера для диагностики проблем и мониторинга здоровья системы. Использовать при отладке ошибок, отслеживании процессов воркеров, исследовании проблем API или мониторинге поведения системы после тестов.

213

openapi-analyzer

mikopbx

Извлечение и анализ OpenAPI 3.1.0 спецификации из MikoPBX для валидации эндпоинтов. Использовать при проверке соответствия API, генерации тестов, проверке схем эндпоинтов или интеграции с навыками endpoint-validator и api-test-generator.

25

api-test-generator

mikopbx

Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.

16

asterisk-tester

mikopbx

Тестирование сценариев Asterisk dialplan и потоков звонков используя безопасные Local каналы. Использовать при тестировании логики маршрутизации звонков, отладке проблем dialplan или проверке потоков IVR меню.

11

asterisk-validator

mikopbx

Валидация конфигурационных файлов Asterisk и анализ логов на корректность и best practices. Использовать при отладке проблем запуска Asterisk, проверке изменений конфигурации или проверке ошибок после регенерации воркерами.

13

You might also like

mlops-engineer

sickn33

Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.

333

senior-devops

davila7

Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.

720

genkit-infra-expert

jeremylongshore

Execute use when deploying Genkit applications to production with Terraform. Trigger with phrases like "deploy genkit terraform", "provision genkit infrastructure", "firebase functions terraform", "cloud run deployment", or "genkit production infrastructure". Provisions Firebase Functions, Cloud Run services, GKE clusters, monitoring dashboards, and CI/CD for AI workflows.

15

prefect-cli

orkapodavid

Prefect CLI commands for mutations. The MCP server is read-only - use this skill when you need to trigger deployments, cancel flow runs, create automations, or modify Prefect resources.

00

monitor-ci

ever-co

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, g

00

turborepo

vercel

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

61191

Search skills

Search the agent skills registry