Getting Started

Getting Started

Download and install

Several deployment scenario exists:

  • Download from GitHub Release
  • Install using GitHub Actions
  • Install as a .net tool

After installation, Terrabuild shall be available in your PATH. You can then invoke the command terrabuild.

GitHub Release

Download Terrabuild from GitHub Releases.

Select your target platform, Terrabuild is running on:

  • MacOS (darwin-x64)
  • Linux (linux-x64)
  • Windows (windows-x64).

GitHub Actions

You can install Terrabuild in your GitHub Actions Workflow using binaries available on GitHub Release:

- name: Install Terrabuild
  uses: jaxxstorm/action-install-gh-release
  with:
    repo: magnusopera/terrabuild
    # tag: 0.62.0
    platform: linux

Dotnet

If you have .net 8, you can install Terrabuild as a tool:

dotnet tool install --global Terrabuild

To update Terrabuild, just run the command again.

Configuration

In order to build your monorepos, some work is required and several files have to be added:

  • WORKSPACE: file at the root of your workspace, it describes common configuration for your project.
  • PROJECT: add one at the root of each project, it describes configuration to build the project.

Probably a bit tedious to do this by hand if you have numerous projects in your monorepo 😓. Terrabuild ships with a scaffolding tool. this will get you on the fast track!

Create an Insights account and enable caching

Terrabuild relies on a backend for sharing artifacts across builds. for this, you need to create an account, an organization and a space on Insights. You will then be able to share artifacts with allowed members in your space.

Want to give it a ride ?

A playground sample repository is available to quickly check if your configuration is correct. This will also give you the opportunity to read WORKFLOW and PROJECT files before heading into the documentation.

Next

Explore the following sections:

Last updated on