Summary
Gets the GitLab CI server information.
- Namespace
- Cake
.Common .Build .GitLabCI .Data - Containing Type
- Git
Lab C I Environment Info
Syntax
public GitLabCIServerInfo Server { get; }
Examples
if (BuildSystem.GitLabCI.IsRunningOnGitLabCI)
{
Information(
@"Server:
Name: {0}
Version: {1}
Revision: {2}",
BuildSystem.GitLabCI.Environment.Server.Name,
BuildSystem.GitLabCI.Environment.Server.Version,
BuildSystem.GitLabCI.Environment.Server.Revision
);
}
else
{
Information("Not running on GitLabCI");
}
if (GitLabCI.IsRunningOnGitLabCI)
{
Information(
@"Server:
Name: {0}
Version: {1}
Revision: {2}",
GitLabCI.Environment.Server.Name,
GitLabCI.Environment.Server.Version,
GitLabCI.Environment.Server.Revision
);
}
else
{
Information("Not running on GitLabCI");
}
Value
Type | Description |
---|---|
GitLabCIServerInfo | The GitLab CI server information. |