Skip to content

Add --service flag, output modes (--quiet/--json/--silent), and deprecate --buildtypeid#77

Merged
katbyte merged 10 commits into
mainfrom
kt/service-flag
May 1, 2026
Merged

Add --service flag, output modes (--quiet/--json/--silent), and deprecate --buildtypeid#77
katbyte merged 10 commits into
mainfrom
kt/service-flag

Conversation

@katbyte
Copy link
Copy Markdown
Owner

@katbyte katbyte commented May 1, 2026

Adds service-level targeting, output verbosity controls, and several quality-of-life improvements.

New Features

--service flag

  • Target specific services when triggering builds: --service network,compute
  • Use --service all to target every service
  • Validates service names against the GitHub repo via the Contents API
  • Without --all, filters discovered tests to the specified services
  • With --all, bypasses test discovery and runs TestAcc for each service directly

Output modes (cout package)

  • --quiet — minimal machine-readable output: PR@SERVICE@BUILDID URL (one line per build)
  • --json — JSON array of all triggered builds, output at the end
  • --silent — suppress all output (errors still print to stderr)
  • All modes configurable via environment variables (TCTEST_OUTPUT_QUIET, TCTEST_OUTPUT_JSON, TCTEST_OUTPUT_SILENT)
  • New lib/cout package centralises output control using gookit/color, preserving colour tags while respecting verbosity levels

--build-link-force-old-ui

  • Appends &fromSakuraUI=true to build URLs to force the classic TeamCity UI

--build-type-id (replaces --buildtypeid)

  • New --build-type-id flag uses the build type ID as-is (no _SERVICE suffix appended)
  • Opt-in to old behaviour with --build-type-id-add-service-suffix
  • --buildtypeid/-b still works but prints a deprecation warning and enables service suffix automatically
  • Errors if both --buildtypeid and --build-type-id are used simultaneously

Other Changes

  • Added environment variables for --comment (TCTEST_COMMENT), --build-link-force-old-ui (TCTEST_FORCE_OLD_UI)
  • Comprehensive README update covering all new flags, output modes with examples, and environment variables

@katbyte katbyte changed the title add service option and update readme (finally) Add --service flag, output modes (--quiet/--json/--silent), and deprecate --buildtypeid May 1, 2026
Copy link
Copy Markdown

@mstroob mstroob left a comment

Choose a reason for hiding this comment

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

LGTM

@katbyte katbyte merged commit a0dda64 into main May 1, 2026
3 checks passed
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