Candoumbe.Pipelines 1.2.1

dotnet add package Candoumbe.Pipelines --version 1.2.1
                    
NuGet\Install-Package Candoumbe.Pipelines -Version 1.2.1
                    
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="Candoumbe.Pipelines" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Candoumbe.Pipelines" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Candoumbe.Pipelines" />
                    
Project file
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 Candoumbe.Pipelines --version 1.2.1
                    
#r "nuget: Candoumbe.Pipelines, 1.2.1"
                    
#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 Candoumbe.Pipelines@1.2.1
                    
#: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=Candoumbe.Pipelines&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Candoumbe.Pipelines&version=1.2.1
                    
Install as a Cake Tool

Candoumbe.Pipelines

GitHub Workflow Status (main) GitHub Workflow Status (develop) GitHub raw issues Nuget

A starter development kit to script your CI/CD using Nuke.

Give a star

⭐ If you like or are using this project please give it a star. Thanks! ⭐

Disclaimer

This project adheres to semantic versioning. Major version zero (0.y.z) is for initial development.

Anything MAY change at any time.

The public API SHOULD NOT be considered stable.

The problem

Most of the time, to set up a CI/CD for your .NET project, you have two options :

1. Going through your repository and use its embedded GUI to create the pipeline

This approach is nice and helpful to get started. But most of the time, the history of changes made to the pipeline is separated from the history of the code base.

2. Writing a pipeline file of some sort

Most of the time in YAML, the file that describes the steps required to build a project is provider specific. So even though you can write YAML, knowing how to write an Azure DevOps pipeline does not really help when it comes to writing a pipeline for GitHub Actions.

The solution

Nuke is a library written by Matthias Koch that helps to create builds.

This project offers an opinionated way at writing pipelines by giving a set of components (more on that later) with the following benefits :

  1. no need to go your code management tool to set up your project CI/CD.
  2. no more YAML file : yeah YAML is great but the tooling is not great and the structure itself is error-prone.
  3. it's just a C# project that every team member can contribute to !
  4. it sits right with your source code so that each change to the pipeline is just a commit into your codebase.

Try it out

To get started you'll have to :

  1. install Nuke.GlobalTool dotnet tool (locally or globally)
  2. run dotnet nuke :setup to set up your pipeline project
  3. replace the Nuke.Common nuget dependency with Candoumbe.Pipelines

From this point, you should be able to customize your pipeline by adding [components] \o/.

How does it work ?

This library is built on top of Nuke, an open source library started by Matthias Koch. It provides a set of components that, when added to a pipeline, bring clever default features.

Components are C# interfaces that come with a default / opinionated implementation. They are grouped in namespaces which correspond to their main task.

  • Candoumbe.Pipelines.Components : contains the core components needed for general required tasks.

Let's say you have the following Build.cs class as your starting pipeline

class Build : NukeBuild
{
    public static void Main() => Execute<Build>(x => x.Compile());

    Target Compile => _ => _
        .Executes(() => {

            // Code omitted for brievity

        });
}

you can get rid of the Compile property and use the ICompile component instead.

class Build : NukeBuild, ICompile
{
    public static void Main() => Execute<Build>(x => ((ICompile)x).Compile());

}

In the example above, the build pipeline benefits from the ICompile component which comes with a default implementation of the Compile target.

Candoumbe.Pipelines.Components.Workflows

This workspace contains components related to branching strategies and providing tools that can help normalize how teams works.

IGitFlow and IGitHubFlow are two main components that helps handle branching strategy locally.

Some components are used to set the workflow to use throughout a repository and streamline the work of a developer and a team.

working on a feature / hotfix
%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart
    A((start)) --> B[["./build feature"]]
    A -->O[["./build hotfix"]]
    O --> P{is on 'hotfix' branch ?}
    P -- yes --> finish-hotfix
    P -- no --> Q{{computes semver}}
    Q --> R{{creates 'hotfix/<semver>' branch}}
    R --> S[work on your hotfix]
    S --> T{Are you done}
    T -- yes --> O
    T -- not yet --> S
    B --> C{is on 'feature/*' branch ?}
    C -- yes --> finish-feature
    C -- no --> D[Creates a new feature/* branch]
    D --> E[Work on your feature]
    E --> F{Are you done ?}
    F --yes --> B
    F -- not yet --> E

    subgraph finish-feature[Finish feature]
      N{{Merges changes to develop branch}}
    end
    
    subgraph finish-hotfix[Finish hotfix]
       Y{{Merges changes to main branch}}
    end

    finish-hotfix --> Z
    finish-feature --> Z((end))

using IGitFlowWithPullRequest or IGitHubFlowWithPullRequest components, the library can automagically create a pull request once you're done working on your feature / hotfix.

class Build : NukeBuild, IGitFlowWithPullRequest
{
    public static void Main() => Execute<Build>(x => x.Compile());

    Target Compile => _ => _
        .Executes(() => {

            // Code omitted for brievity

        });
}

or

class Build : NukeBuild, IGitHubFlowWithPullRequest
{
    public static void Main() => Execute<Build>(x => x.Compile());

    Target Compile => _ => _
        .Executes(() => {

            // Code omitted for brievity

        });
}

depending on the workflow that better suits you.

working on a release

To start working on a release, simply call ./build.cmd release and your pipeline will trigger the appropriate commands to get you started.

Calling ./build.cmd release from the release branch created will trigger the appropriate command to finish your release.

%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart
    A((start)) --> B["./build release"]
    B --> C{is on 'release/*' branch ?}
    C -- no --> create-branch
    subgraph create-branch[Create a release branch]
        G{{computes semver version}} --> H{{create release/version branch}}
    end
    create-branch --> D[Work on your release]
    C -- yes --> finish-release
    D --> E{Are you done ?}
    E --yes --> B
    E -- not yet --> D

    subgraph finish-release[Finish release]
      J[Update changelog] --> K{{validate changelog modifications}}
      K --> M{{create tag}}
      M --> N{{Merges changes to main branch}}
      N --> O{{Merges changes to develop branch}}
    end

    finish-release --> Z((end))
Candoumbe.Pipelines.Components.NuGet

Contains classes required to push nuget packages to repositories.

Candoumbe.Pipelines.Components.GitHub

Contains classes and components needed to interact with GitHub repositories (creating pull requests).

Candoumbe.Pipelines.Components.Docker

Contains classes and components needed to build and push docker images.

⚠️ Some components may require additional packages and/or tools to be installed in order to be fully functional. For example, the default implementation of the IMutationTest component uses Stryker to run mutation tests.

You can refer to Nuke's documentation to see how to reference required tools.

Want to contribute ?

You can contribute by opening an issue or submitting a feature request.

PRs are welcome, check out the contribution guidelines if you want to contribute to this project !

Special thanks

  • Matthias Koch for the marvelous Nuke library. This project would never exist without its work.
Product 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 was computed.  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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Candoumbe.Pipelines:

Package Downloads
SocialiteNET

OAuth authentication with Bitbucket, Facebook, GitHub, GitLab, Google, LinkedIn, Slack, Twitch, and X becomes expressive and fluid with Socialite. It manages nearly every boilerplate social authentication code that you are afraid to write.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 1,104 9/14/2025
1.2.1-fix.5 110 9/13/2025
1.2.1-fix.2 181 9/10/2025
1.2.0 354 9/9/2025
1.1.0 191 9/9/2025
1.1.0-rc.20 123 9/8/2025
1.1.0-rc.19 130 9/6/2025
1.1.0-alpha.9 267 8/28/2025
1.0.1 281 8/27/2025
1.0.0-rc.25 232 8/19/2025
0.13.4 433 8/18/2025
0.13.4-fix.4 282 8/5/2025
0.13.4-beta.3 203 8/5/2025
0.13.3 326 7/28/2025
0.13.3-beta.2 150 6/16/2025
0.13.3-beta.1 180 4/13/2025
0.13.2 825 4/13/2025
0.13.2-beta.6 121 4/13/2025
0.13.2-beta.5 121 4/13/2025
0.13.2-beta.4 117 4/13/2025
0.13.2-beta.1 140 4/12/2025
0.13.1 740 4/12/2025
0.13.1-beta.1 120 4/12/2025
0.13.0 232 4/11/2025
0.13.0-rc.55 96 4/11/2025
0.13.0-rc.54 126 4/11/2025
0.13.0-rc.53 123 4/11/2025
0.13.0-rc.52 186 4/10/2025
0.13.0-rc.51 154 4/10/2025
0.13.0-rc.50 162 4/10/2025
0.13.0-rc.49 142 4/10/2025
0.13.0-rc.44 180 4/9/2025
0.13.0-rc.43 157 4/9/2025
0.13.0-rc.42 142 4/9/2025
0.13.0-rc.41 178 4/9/2025
0.13.0-rc.39 548 1/12/2025
0.13.0-rc.38 238 1/10/2025
0.13.0-rc.37 106 1/10/2025
0.13.0-rc.36 88 1/1/2025
0.13.0-rc.35 123 12/31/2024
0.13.0-rc.34 110 12/30/2024
0.13.0-rc.33 76 12/30/2024
0.13.0-rc.32 74 12/30/2024
0.13.0-rc.31 74 12/30/2024
0.13.0-rc.30 96 12/30/2024
0.13.0-rc.1 81 12/30/2024
0.13.0-integration-test-com... 72 12/30/2024
0.12.1 1,739 11/12/2024
0.11.0 572 9/14/2024
0.11.0-rc.1 79 9/14/2024
0.10.0 569 7/11/2024
0.10.0-remove-nuget-req0001 160 2/17/2024
0.9.0 1,241 1/25/2024
0.9.0-rc0009 147 1/25/2024
0.9.0-rc0001 148 1/23/2024
0.8.0 314 12/15/2023
0.7.0 989 9/23/2023
0.7.0-rc0004 218 9/18/2023
0.7.0-rc0003 242 9/15/2023
0.7.0-rc0001 200 9/14/2023
0.7.0-rc0000 167 9/13/2023
0.6.1 384 8/31/2023
0.6.1-beta0017 198 9/2/2023
0.6.1-beta0005 197 8/30/2023
0.6.0 517 8/15/2023
0.6.0-rc0003 204 8/15/2023
0.6.0-rc0002 217 8/15/2023
0.6.0-rc0001 247 8/14/2023
0.6.0-rc0000 237 8/13/2023
0.5.0 482 7/24/2023
0.5.0-rc0002 235 7/24/2023
0.5.0-rc0001 284 7/20/2023
0.5.0-rc0000 257 7/20/2023
0.5.0-pulish-nupkg-by-0060 242 7/14/2023
0.5.0-pulish-nupkg-by-0059 230 7/14/2023
0.5.0-pulish-nupkg-by-0058 245 7/14/2023
0.5.0-beta0000 231 7/20/2023
0.5.0-alpha0071 235 7/17/2023
0.4.5 286 7/17/2023
0.4.5-beta0001 220 7/17/2023
0.4.4 313 7/14/2023
0.4.3 286 7/10/2023
0.4.3-beta0006 208 7/8/2023
0.4.3-beta0004 220 7/7/2023
0.4.3-beta0003 224 7/6/2023
0.4.3-beta0001 221 7/6/2023
0.4.2 288 7/5/2023
0.4.1 260 7/5/2023
0.4.1-beta0014 217 7/5/2023
0.4.0 291 7/3/2023
0.4.0-beta0016 229 7/3/2023
0.4.0-beta0015 225 7/2/2023
0.4.0-beta0014 216 7/2/2023
0.4.0-beta0013 199 6/30/2023
0.4.0-beta0012 1,935 6/29/2023
0.4.0-beta0011 238 6/28/2023
0.4.0-beta0007 238 6/9/2023
0.4.0-beta0006 239 5/30/2023
0.4.0-beta0005 219 5/30/2023
0.4.0-beta0002 237 5/30/2023
0.4.0-beta0000 260 3/28/2023
0.3.0 1,467 2/5/2023
0.3.0-beta0001 342 1/30/2023
0.3.0-alpha0011 323 1/29/2023
0.2.0 415 1/22/2023
0.2.0-publish-using-a-0001 238 6/29/2023
0.2.0-coldfix-restore0001 230 6/29/2023
0.2.0-beta0001 219 6/29/2023
0.2.0-alpha0048 265 12/24/2022
0.2.0-alpha0046 249 12/24/2022
0.2.0-alpha0040 257 11/26/2022
0.2.0-alpha0039 254 11/20/2022
0.2.0-alpha0036 283 11/10/2022
0.2.0-alpha0035 255 11/9/2022
0.2.0-alpha0034 246 11/9/2022
0.2.0-alpha0032 236 11/5/2022
0.2.0-alpha0022 272 10/30/2022
0.2.0-alpha0020 228 10/30/2022
0.2.0-alpha0018 254 10/23/2022
0.2.0-alpha0016 248 10/23/2022
0.2.0-alpha0014 301 10/23/2022
0.1.0-alpha0003 258 10/23/2022

### 🛠️ Fixes
• Fixed incorrect source branch name when creating a chore branch ([#202](https://github.com/candoumbe/pipelines/issues/202))
• Fixed the behavior of chore command when running from a chore/* branch : the command will now properly end the chore workflow.
### 🚀 New features
• Added IDoChoreWorkflow to IGitFlow and IGitHubFlow: this enable the chore target on those workflows

Full changelog at https://github.com/candoumbe/Pipelines/blob/main/CHANGELOG.md