Summary
Gets the username of the user that triggered the build. This will have one of three possible values:
anonymous - if there is no security.
username of the user, who triggered the build.
changes, if SCM changes auto-triggered the build.
timer, if the pipeline is triggered at a scheduled time.
- Namespace
- Cake
.Common .Build .GoCD .Data - Containing Type
- GoCDEnvironmentInfo
Syntax
public string User { get; }
Examples
if (BuildSystem.GoCD.IsRunningOnGoCD)
{
Information(
@"User: {0}",
BuildSystem.GoCD.Environment.User
);
}
else
{
Information("Not running on GoCD");
}
if (GoCD.IsRunningOnGoCD)
{
Information(
@"User: {0}",
GoCD.Environment.User
);
}
else
{
Information("Not running on GoCD");
}
Value
Type | Description |
---|---|
string | The username of the user that triggered the build. |