-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
area:configConfiguration management (parameters, DSL, cleanup)Configuration management (parameters, DSL, cleanup)enhancementNew feature or requestNew feature or request
Description
Area: Configuration (parameters, projects)
Problem or use case
The CLI has a CreateBuildStep API method but no CLI commands for managing build steps. Build engineers (Journey 5) and agents setting up CI (Journey 2) need to add, view, and modify build steps. Currently the only option is raw API calls with complex JSON payloads:
# Current workaround — requires knowing the exact step JSON schema
teamcity api '/app/rest/buildTypes/id:MyBuild/steps' -X POST --input step.jsonThe job param subcommand group exists as a pattern — job step follows the same model.
Proposed solution
teamcity job step list <job-id> # List all steps
teamcity job step view <job-id> <step-id> # View step details
teamcity job step add <job-id> --type <runner> --name "Step Name" # Add a step
teamcity job step remove <job-id> <step-id> # Remove a stepAdding steps
# Command line runner
teamcity job step add MyBuild --type commandLine --name "Run Tests" \
--param "script.content=./gradlew test"
# Gradle runner
teamcity job step add MyBuild --type gradle --name "Build" \
--param "gradle.tasks=build" \
--param "gradle.wrapper=true"
# Docker
teamcity job step add MyBuild --type docker --name "Build Image" \
--param "docker.command.type=build"Output:
$ teamcity job step list MyProject_Build
# NAME TYPE STATUS
1 Compile gradle enabled
2 Run Tests commandLine enabled
3 Build Image docker disabled
Flags for job step add
--type(required) — runner type (commandLine, gradle, maven, docker, etc.)--name— step name--param— step parameter (repeatable,key=value)--json— machine-readable output
Flags for job step list
--json— machine-readable output
API
Uses existing CreateBuildStep method and adds:
GetBuildSteps(buildTypeID string) (*BuildStepList, error)
GetBuildStep(buildTypeID, stepID string) (*BuildStep, error)
DeleteBuildStep(buildTypeID, stepID string) errorREST endpoints:
GET /app/rest/buildTypes/id:<id>/steps
GET /app/rest/buildTypes/id:<id>/steps/<step-id>
POST /app/rest/buildTypes/id:<id>/steps
DELETE /app/rest/buildTypes/id:<id>/steps/<step-id>
Alternatives considered
- Only manage steps via Kotlin DSL / versioned settings — doesn't work for server-only configurations, and agents need to make targeted edits without rewriting DSL
- Add step management to
teamcity apidocs/skill only — payload complexity makes this impractical for agents
Contribution
- I'd be willing to submit a PR for this feature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:configConfiguration management (parameters, DSL, cleanup)Configuration management (parameters, DSL, cleanup)enhancementNew feature or requestNew feature or request