Documentation
¶
Overview ¶
Package link reads and writes teamcity.toml: a committed file binding a repository to one or more TeamCity servers, with optional per-path overrides inside each server entry.
Index ¶
Constants ¶
const FileName = "teamcity.toml"
FileName is the canonical committed-config filename.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
Find walks up from start looking for FileName, stopping at the git repo root so an unrelated ancestor teamcity.toml can't leak in; returns absolute path + true on hit.
Types ¶
type Config ¶
type Config struct {
Servers []Server `toml:"server,omitempty"`
}
Config is the parsed teamcity.toml.
func (*Config) UpsertScope ¶
UpsertScope merges scope into the entry for serverURL at path (path="" = server top-level). Unspecified fields are preserved so re-linking with one flag doesn't blow away the others — except when --project changes, which invalidates any existing job bindings tied to the old project (including inherited child paths whose effective project comes from the server).
type PathScope ¶
type PathScope struct {
Project string `toml:"project,omitempty"`
Job string `toml:"job,omitempty"`
Jobs []string `toml:"jobs,omitempty"`
}
PathScope is a per-subdirectory binding inside a server entry.
type Server ¶
type Server struct {
URL string `toml:"url"`
Project string `toml:"project,omitempty"`
Job string `toml:"job,omitempty"`
Jobs []string `toml:"jobs,omitempty"`
Paths map[string]PathScope `toml:"paths,omitempty"`
}
Server is one [[server]] entry: a TC instance with default project/job and optional per-path overrides.