FlubuCore is a free, open source build & deployment project written in C# and released under MIT. It has 937 GitHub stars, 99 forks and 31 open issues, and was last pushed 7 months ago. On this registry it ranks #64 of 84 tracked projects in Build & Deployment, with 5 head-to-head comparisons available.

What is FlubuCore?

FlubuCore is a cross-platform build and deployment automation system that lets .NET teams define build and deployment scripts in C# through a fluent interface, aimed at developers and release engineers who want IntelliSense, debugging, custom analyzers, and full access to the .NET ecosystem inside their build scripts.

What it is

FlubuCore ("Fluent Builder Core") is a cross-platform build and deployment automation system where build and deployment scripts are written in C# using an intuitive fluent interface. Scripts are compiled and executed by a .NET (Core) console application that uses the power of Roslyn. It is a member project of the .NET Foundation and of the .NET Core Community, distributed under the MIT licence.

The concrete problem it solves is the scripting language gap in .NET build pipelines. Traditional build tooling forces teams into a separate DSL or XML dialect with its own syntax, limited tooling, and a boundary between the build script and the rest of the codebase. FlubuCore replaces that dialect with C# itself, so the script gets code completion, IntelliSense, debugging, FlubuCore custom analyzers, and native access to the whole .NET ecosystem. It occupies the build and continuous integration / continuous deployment space in the .NET toolchain, and it is the fluent-interface build system that stands in place of the usual external build DSL.

Key capabilities

  • Targets are declared with a fluent API: context.CreateTarget("Pack"), .SetDescription(...), .DependsOn(pack), .AddCoreTask(...), and conditional .When(...) guards.
  • Built-in task library covers versioning, running tests, creating deployment packages, publishing NuGet packages, Docker, Git, SQL, npm, executing PowerShell, and managing IIS scripts.
  • Named task helpers include GitVersionTask(), CompileSolutionTask("MySolution.sln").BuildConfiguration("Release"), XunitTaskByProjectName("MyProject").StopOnFail(), NUnitTask(NunitCmdOptions.V3, "MyProject2").ExcludeCategory("Linux"), and CoverletTask("MyProject.dll").
  • NuGet publishing through NugetPush($"{OutputDirectory}/NetCoreOpenSource.nupkg").ServerUrl(...).ApiKey(NugetApiKey).
  • Build-system detection via context.BuildSystems().Travis().Branch and context.BuildSystems().RunningOn == BuildSystemType.TravisCI, so targets run only on the intended CI.
  • Arbitrary custom C# code inside a target via .Do(c => { ... }), including calling other FlubuCore tasks from inside the block with c.Tasks().GenerateT4Template("example.TT").Execute(c).
  • Script parameters bound from the command line with attributes such as [FromArg("nugetKey", "Nuget api key for publishing Flubu nuget packages.")].
  • Assembly references and NuGet packages are loaded automatically into the script.

Who uses it and how

  • .NET teams that need one build definition used both locally and on CI, running the same targets from a developer machine and from a Travis CI build.
  • Projects publishing NuGet packages, where Pack and Nuget.publish targets chain through DependsOn and gate the push on the branch ending in stable.
  • Solutions with mixed test runners, running xUnit by project name and NUnit with excluded categories in one run.tests target, with coverage collected by Coverlet.
  • Teams managing deployment infrastructure, using the built-in Docker, Git, SQL, npm, PowerShell, and IIS tasks instead of separate shell scripts.
  • Multi-OS teams that need the same script to execute through the .NET 4.62 runner or the .NET Core CLI tool.

Getting started

Run a target from the console as flubu.exe Default on .NET 4.62+, as dotnet flubu Default with the .NET Core 1.0+ CLI tool, or as flubu Default with the .NET Core 2.1+ local or global tool. Documentation lives at https://flubucore.dotnetcore.xyz/.

How it compares

No comparable products are named in the facts supplied for this entry, and the registry lists no equivalent tool alongside it, so FlubuCore stands alone in this registry.

When to use it — and when not to

Pick it when the build script belongs to the .NET world and C# fluency already exists on the team, since it adds no service, database, or message broker to operate — it is a console application and a tool invocation. Avoid it if contributors are not .NET developers, because writing a script means writing and debugging C#. Note that the GitHub README is thin and partly truncated in the excerpt, so the real documentation is the site rather than the repository, and the project carries 31 open issues.

project readme (upstream, from github) — read inline

English | 中文

FlubuCore

Build Status NuGet Badge Gitter Member project of .NET Foundation Member project of .NET Core Community License

Introduction

"FlubuCore - Fluent Builder Core" is a cross platform build and deployment automation system. You can define your build and deployment scripts in C# using an intuitive fluent interface. This gives you code completion, IntelliSense, debugging, FlubuCore custom analyzers, and native access to the whole .NET ecosystem inside of your scripts.

FlubuCore in action

FlubuCore offers a .net (core) console application that uses power of roslyn to compile and execute scripts. Above example can be run from console with:

  • FlubuCore runner (.NET 4.62+) flubu.exe Default
  • FlubuCore dotnet cli tool (.NET Core 1.0+) dotnet flubu Default
  • FlubuCore local or global tool (.NET Core 2.1+) flubu Default

Features and Advantages

  • Intuitive an easy to learn. C#, fluent interface, and IntelliSense make even most complex script creation a breeze.
    [FromArg("nugetKey", "Nuget api key for publishing Flubu nuget packages.")]
    public string NugetApiKey { get; set; }

    protected override void ConfigureTargets(ITaskContext context)
    {
        var pack = context.CreateTarget("Pack")
            .SetDescription("Prepare's nuget package.")
            .AddCoreTask(x => x.Pack()
                .NoBuild()
                .OutputDirectory(OutputDirectory)
                .WithArguments("--force")); //you can add your own custom arguments on each task

        var branch = context.BuildSystems().Travis().Branch;
       
        var nugetPush = context.CreateTarget("Nuget.publish")
            .SetDescription("Publishes nuget package.")
            .DependsOn(pack)
            .AddCoreTask(x => x.NugetPush($"{OutputDirectory}/NetCoreOpenSource.nupkg")
                .ServerUrl("https://www.nuget.org/api/v2/package")
                .ApiKey(NugetApiKey)
            )
            .When(c => c.BuildSystems().RunningOn == BuildSystemType.TravisCI
                        && !string.IsNullOrEmpty(branch)
                        && branch.EndsWith("stable", StringComparison.OrdinalIgnoreCase));
    }
  • Large number of often used built-in tasks like e.g. versioning, running tests, creating deployment packages, publishing NuGet packages, docker tasks, git tasts, sql tasks, npm tasks, executing PowerShell, managing IIS scripts and many more.
context.CreateTarget("build")
   .AddTask(x => x.GitVersionTask())
   .AddTask(x => x.CompileSolutionTask("MySolution.sln").BuildConfiguration("Release");

context.CreateTarget("run.tests")
   .AddTask(x => x.XunitTaskByProjectName("MyProject").StopOnFail())
   .AddTask(x => x.NUnitTask(NunitCmdOptions.V3, "MyProject2").ExcludeCategory("Linux"))
   .AddCoreTask(x => x.CoverletTask("MyProject.dll"));
context.CreateTarget("DoExample")
        .Do(c =>
        {
            // write your awesome code.
            File.Copy("NotSoAwesome.txt", Path.Combine(OutputDirectory, "JustAnExample.txt") );
            // Access flubu built in tasks in DO if needed.
            c.Tasks().GenerateT4Template("example.TT").Execute(c);                
        })
        .AddTask(x => x.CompileSolutionTask())
        .Do(NuGetPackageReferencingExample);
[NugetPackage("Newtonsoft.json", "11.0.2")]
[Assembly(".\Lib\EntityFramework.dll")]
public class BuildScript : DefaultBuildScript
{
   public void NuGetPackageReferencingExample(ITaskContext context)
    {
        JsonConvert.SerializeObject("Example");
    }
}
context.CreateTarget("Run.Libz")
    .AddTask(x => x.RunProgramTask(@"packages\LibZ.Tool\1.2.0\tools\libz.exe")
        .WorkingFolder(@".\src")
        .WithArguments("add")
        .WithArguments("--libz", "Assemblies.libz"));
public class SimpleScript : DefaultBuildScript
{
   [FromArg("c", "The configuration to use for building the project.")]
   public string Configuration { get; set; } = "Release"

   [FromArg("sn", "If true app is deployed on second node. Otherwise not.")]
   public bool deployOnSecondNode { get; set; }

   protected override void ConfigureTargets(ITaskContext context)
   {
        context.CreateTarget("build")
           .AddCoreTask(x => x.Build()
               .Configuration(Configuration)
               .ForMember(x =>  x.Framework("net462"), "f", "The target framework to build for.")); 
   }
}
 flubu build -c=Debug -f=netcoreapp2.0

FlubuCore interactive mode

FlubuCore analyzers in action

Getting Started

Using FlubuCore is straightforward and very simple :-) It is also fully and throughly documented.

The Getting Started chapter in FlubuCore Documentation will help you set up your first FlubuCore build in no time. You should also check getting started blog. It has some more details with some nice tips and tricks.

A comprehensive list of features that FlubuCore has to offer with descriptions can be found in the Build Script Fundamentals chapter.

Once you have your build and deployment scripts defined, the following Wiki chapters will explain how to run them:

Examples

Aside from the detailed Wiki FlubuCore comes with example projects that reflect real-life situations. The examples can be found in the separate Examples repository.

These examples will help you to get quickly start with FlubuCore:

  • .NET Framework build example - Example covers versioning, building the project, running tests, packaging application for deployment and some other basic use cases.

  • .NET Core build example - Example covers versioning, building the project, running tests, packaging application for deployment and some other basic use cases.

  • Deployment script example - Example shows how to write simple deployment script.

  • Open source library example - Example covers versioning, building the project, running tests and publishing nuget package. It also covers how to run build script on Appveyor and Travis CI.

Have a question?

Join the chat at https://gitter.im/FlubuCore/Lobby

Contributing

Please see CONTRIBUTING.md.

Ways to Contribute

  • We appreciate deeply any feedback that you may have! Feel free to participate in the chat, or add an issue in the issue tracker.
  • Spread the word about the project.
  • If you like the project don't forget to give it a star so that the community get's bigger.
  • Improve documentation.
  • Report, fix a bug.
  • Implement a new feature.
  • Discuss potential ways to improve project.
  • Improve existing implementation, performance, etc.

Changelog and Roadmap

Changes with description and examples can be found in Changelog

You can see FlubuCore roadmap by exploring opened Milestones.

Further Development

If you find FlubuCore useful (you feel it helps you on the daily basis) you can support further development by buying us a coffee (or become a backer or sponsor). Sometimes it's hard to stay awake till midnight implementing new features, coffee helps us with that. We would really appreciate your support. Money from sponsorship will also be used for the promotion of the project. If you are a backer or a sponsor you can also request for a new feature or ask for support. These issues will be handled with highest priority.

Backers and Sponsors

OpenCollective OpenCollective

Used & Powered by

Thank's to Comtrade for supporting us.

FlubuCore analyzers in action

Acknowledgements

  • Special thanks to @ironcev for greatly improving readme and for giving some valuable advices.
  • Special thanks to @alexinea for translating whole documentation to Chinese.
  • Special thanks to @huanlin for writing blogs about FlubuCore in Traditional Chinese and for translating them to English.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

.NET Foundation

This project is supported by the .NET Foundation.

Frequently asked questions

Is FlubuCore free to use?

FlubuCore is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does FlubuCore do?

A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.

What is FlubuCore written in?

FlubuCore is primarily written in C#. Its source is publicly available at https://github.com/dotnetcore/FlubuCore, and it has 937 GitHub stars.