Summary
Gets Bitbucket Pipelines repository information.
- Namespace
- Cake
.Common .Build .BitbucketPipelines .Data - Containing Type
- Bitbucket
Pipelines Environment Info
Syntax
public BitbucketPipelinesRepositoryInfo Repository { get; }
Examples
if (BuildSystem.BitbucketPipelines.IsRunningOnBitbucketPipelines)
{
Information(
@"Repository:
Branch: {0}
Tag: {1}
Commit: {2}
Repo Owner: {3}
Repo Slug: {4}",
BuildSystem.BitbucketPipelines.Environment.Repository.Branch,
BuildSystem.BitbucketPipelines.Environment.Repository.Tag,
BuildSystem.BitbucketPipelines.Environment.Repository.Commit,
BuildSystem.BitbucketPipelines.Environment.Repository.RepoOwner,
BuildSystem.BitbucketPipelines.Environment.Repository.RepoSlug
);
}
else
{
Information("Not running on BitbucketPipelines");
}
if (BitbucketPipelines.IsRunningOnBitbucketPipelines)
{
Information(
@"Repository:
Branch: {0}
Tag: {1}
Commit: {2}
Repo Owner: {3}
Repo Slug: {4}",
BitbucketPipelines.Environment.Repository.Branch,
BitbucketPipelines.Environment.Repository.Tag,
BitbucketPipelines.Environment.Repository.Commit,
BitbucketPipelines.Environment.Repository.RepoOwner,
BitbucketPipelines.Environment.Repository.RepoSlug
);
}
else
{
Information("Not running on BitbucketPipelines");
}
Value
Type | Description |
---|---|
Bitbucket |
The repository. |