Bitbucket Pipelines

Out of the box support

The BitbucketPipelines alias, which returns an IBitbucketPipelinesProvider instance can be used to interact with the Atlassian Bitbucket Pipelines environment.

The following example writes pull request ID if running on Atlassian Bitbucket Pipelines:

if (BuildSystem.BitbucketPipelines.IsRunningOnBitbucketPipelines)
{
    Information(BuildSystem.BitbucketPipelines.Environment.PullRequest.Id);
}
else
{
    Information("Not running on Atlassian Bitbucket Pipelines");
}

See IBitbucketPipelinesProvider for details and available methods to interact with Atlassian Bitbucket Pipelines.

Running Cake

The recommended way to run the Cake .NET Tool on Bitbucket Pipelines is by using a tool manifest:

pipelines:
  default:
    - step:
        script:
          - dotnet tool restore
          - dotnet cake

If you are using Cake.Sdk with a file-based script:

pipelines:
  default:
    - step:
        script:
          - dotnet cake.cs

If you are using Cake.Sdk with a project:

pipelines:
  default:
    - step:
        script:
          - dotnet run --project cake.csproj

If you are using Cake Frosting:

pipelines:
  default:
    - step:
        script:
          - dotnet run --project cake.csproj

Available 3rd party extensions

No extensions found