Skip to content

simplesurance/baur-example

Repository files navigation

baur Example Repository

This repository showcases the incremental task runner baur.
It can be cloned and used to try and experiment with baur locally.
The directory structure represents a monorepo with multiple applications:

All application tasks (like compiling an application) are run in docker containers.
This ensures the reproducibility of tasks.
It also makes it simple to track changes in the execution environment by specifying the reference of the docker image an input file of the task.

Requirements

The following applications needs to be installed to experiment with baur in the example repository:

  • Git
  • Go
  • Bash
  • Make
  • Docker or buildah

Quickstart

  • Clone the repository:

    git clone git@github.com:simplesurance/baur-example.git
    
  • Download the latest release archive from Release Page and copy baur into your $PATH

  • Run the start-env.sh script to start a PostgreSQL server and a Docker registry server in docker containers:

    ./start-env.sh
  • Create the baur database tables by running:

    baur init db

Now you can start to experiment with baur.

Things to Try

Some things you could do in the repository:

  • List Tasks in the repository with their build status:

    baur status
  • Run all tasks with outstanding status, upload their artifacts and record the results:

    baur run

    (The first execution of a task can take a bit longer because docker images are downloaded.)

  • List recorded task runs:

    baur ls runs '*'
  • Show information about the "rng" application:

    baur show rng
  • Show the outputs that were produced by the past task-run with id 2:

    baur ls outputs 2
  • Show the build inputs with their digests of the build task of the "hello-server" application:

    baur ls inputs --digests hello-server.build
  • Create example baur config files and define your own tasks:

    baur init app
    baur init include