Documentation
¶
Overview ¶
Package onboarding passes the `teamcity onboard` context to the commands its AI agent runs, and reports onboarding steps to the server.
Index ¶
- Constants
- func Current() (api.OnboardingRepositoryType, bool)
- func Enabled() bool
- func Env(rt api.OnboardingRepositoryType) string
- func Notify(ctx context.Context, debug func(string, ...any), endpoint string, ...)
- func NotifyBuildQueued(f *cmdutil.Factory, client api.ClientInterface, buildID int)
- func NotifyInBackground(ctx context.Context, debug func(string, ...any), endpoint string, ...)
- func NotifyPipelineCreated(f *cmdutil.Factory, client api.ClientInterface, pipelineID string)
Constants ¶
const EnvOnboarding = "TEAMCITY_ONBOARDING"
EnvOnboarding carries the repository type (own or demo) from `teamcity onboard` to the commands its AI agent runs.
Variables ¶
This section is empty.
Functions ¶
func Current ¶
func Current() (api.OnboardingRepositoryType, bool)
Current returns the repository type when running inside `teamcity onboard`; any other value of EnvOnboarding is ignored.
func Enabled ¶
func Enabled() bool
Enabled reports whether onboarding reports may be sent and recorded; not when CLI analytics is opted out.
func Env ¶
func Env(rt api.OnboardingRepositoryType) string
Env returns the EnvOnboarding entry for the agent's environment.
func Notify ¶
func Notify(ctx context.Context, debug func(string, ...any), endpoint string, call func(context.Context) error)
Notify runs call, which reports one onboarding step to the server, unless CLI analytics is opted out; a failure is only logged at debug level.
func NotifyBuildQueued ¶
func NotifyBuildQueued(f *cmdutil.Factory, client api.ClientInterface, buildID int)
NotifyBuildQueued reports a build that `run start` queued inside the onboarding to the server; outside it, it does nothing.
func NotifyInBackground ¶
func NotifyInBackground(ctx context.Context, debug func(string, ...any), endpoint string, call func(context.Context) error)
NotifyInBackground is Notify without waiting for the server; a report still in flight when the process exits is lost.
func NotifyPipelineCreated ¶
func NotifyPipelineCreated(f *cmdutil.Factory, client api.ClientInterface, pipelineID string)
NotifyPipelineCreated reports a pipeline that `pipeline create` created inside the onboarding to the server; outside it, it does nothing.
Types ¶
This section is empty.