Buildkite.Sdk
0.1.0
dotnet add package Buildkite.Sdk --version 0.1.0
NuGet\Install-Package Buildkite.Sdk -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Buildkite.Sdk" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Buildkite.Sdk" Version="0.1.0" />
<PackageReference Include="Buildkite.Sdk" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Buildkite.Sdk --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Buildkite.Sdk, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Buildkite.Sdk@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Buildkite.Sdk&version=0.1.0
#tool nuget:?package=Buildkite.Sdk&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Buildkite SDK for C#
A C# SDK for Buildkite that makes it easy to generate dynamic pipeline configurations programmatically.
Installation
dotnet add package Buildkite.Sdk
Quick Start
using Buildkite.Sdk;
using Buildkite.Sdk.Schema;
var pipeline = new Pipeline();
pipeline.AddStep(new CommandStep
{
Label = ":hammer: Build",
Command = "dotnet build"
});
pipeline.AddStep(new WaitStep());
pipeline.AddStep(new CommandStep
{
Label = ":test_tube: Test",
Command = "dotnet test"
});
// Output as YAML for `buildkite-agent pipeline upload`
Console.WriteLine(pipeline.ToYaml());
Usage
Command Steps
pipeline.AddStep(new CommandStep
{
Label = ":dotnet: Build",
Key = "build",
Command = "dotnet build --configuration Release",
Agents = new AgentsObject { ["queue"] = "linux" },
TimeoutInMinutes = 30
});
Block Steps
pipeline.AddStep(new BlockStep
{
Block = ":rocket: Deploy to Production?",
Prompt = "Are you sure?"
});
Wait Steps
pipeline.AddStep(new WaitStep());
pipeline.AddStep(new WaitStep { ContinueOnFailure = true });
Trigger Steps
pipeline.AddStep(new TriggerStep
{
Trigger = "deploy-pipeline",
Build = new TriggerBuild { Branch = "main" }
});
Group Steps
pipeline.AddStep(new GroupStep
{
Group = ":test_tube: Tests",
Steps = new List<IGroupStep>
{
new CommandStep { Label = "Unit", Command = "dotnet test" },
new CommandStep { Label = "Integration", Command = "dotnet test --filter Integration" }
}
});
Environment Variables
using Buildkite.Sdk;
var branch = EnvironmentVariable.Branch;
var commit = EnvironmentVariable.Commit;
var buildNumber = EnvironmentVariable.BuildNumber;
Output Formats
string yaml = pipeline.ToYaml(); // For buildkite-agent pipeline upload
string json = pipeline.ToJson(); // JSON format
Development
dotnet build
dotnet test
dotnet pack -c Release
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- YamlDotNet (>= 16.2.1)
-
net9.0
- YamlDotNet (>= 16.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 92 | 2/4/2026 |