Summary
Gets Jenkins repository information.
- Namespace
- Cake
.Common .Build .Jenkins .Data - Containing Type
- Jenkins
Environment Info
Syntax
public JenkinsRepositoryInfo Repository { get; }
Examples
if (BuildSystem.Jenkins.IsRunningOnJenkins)
{
Information(
@"Repository:
BranchName: {0}
GitCommitSha: {1}
GitBranch: {2}",
BuildSystem.Jenkins.Environment.Repository.BranchName,
BuildSystem.Jenkins.Environment.Repository.GitCommitSha,
BuildSystem.Jenkins.Environment.Repository.GitBranch
);
}
else
{
Information("Not running on Jenkins");
}
if (Jenkins.IsRunningOnJenkins)
{
Information(
@"Repository:
BranchName: {0}
GitCommitSha: {1}
GitBranch: {2}",
Jenkins.Environment.Repository.BranchName,
Jenkins.Environment.Repository.GitCommitSha,
Jenkins.Environment.Repository.GitBranch
);
}
else
{
Information("Not running on Jenkins");
}
Value
Type | Description |
---|---|
Jenkins |
The repository. |