Using NUKE to automate your .NET build.

Using NUKE to automate your .NET build.

Using NUKE to automate your .NET build.

Introduction

NUKE is a powerful build system for .NET solutions.

It works well when automating your build pipelines across legacy code bases and greenfield projects.

It allows you to define complex custom-build processes while providing many built-in tools that work right out of the box to get up and running quickly.

Six reasons to use Nuke on your .NET projects

  1. Use C# to write automation tools and CI/CD pipelines. This means you can use C# with access to all the libraries of the .NET framework to automate your test process, build and deploy software (including Docker), run tests, and generate reports.
  2. Debug and test your builds locally. Save time and effort on managing your build, which means you can focus on building your product.
  3. Support extensions for Visual Studio, Rider, ReSharper, or VS Code let you build and debug your app with the same tooling you use to build your system.
  4. CI/CD generation helps you quickly get a build server up and running and automate your delivery pipelines.
  5. Parallel execution speeds up your builds, and use caching to minimize the time it takes for each build.
  6. Build sharing lets you use a shared global build instead of maintaining individual build projects in your repositories. This gives you a consistent build across all of your projects, which is especially useful when working with libraries that have dependencies.

Getting started

NUKE has a tool to help you set up and run your build projects from a terminal.


dotnet tool install Nuke.GlobalTool --global

nuke :setup

nuke

You can now version your build project alongside your solution.

Next, you’ll write some c# code to run specific targets or specify parameters for your system.

Here’s the great thing: you use all your IDE debugger features to investigate build issues locally and run build steps in isolation, so you don’t impact other developers’ workflows or risk breaking CI.

Hint: You may have to change your file permissions on your build server:


git update-index --chmod=+x .\build.cmd

git update-index --chmod=+x .\build.sh

Conclusion

NUKE is a powerful tool to automate your CI/CD pipeline.

It’s open source and free to use, so if you’re looking for a way to speed up your builds or reduce the manual work involved in deploying applications, Nuke is worth checking out.


By the way…

DevOps is hot.

.NET teams around the world are integrating test, build and deployment into the full stack and creating faster, more reliable processes for their own products.

Now you can amplify the benefit of an already successful devops strategy by scaling it to include everything from one-off development and test instances to full scale application deployment.

Deploy faster than ever with expert guidance.

Click here or contact us today. We’ll help you start doing better testing faster than ever before!

LET'S WORK TOGETHER