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:
- a-team/[..]/hello-server/: Demonstrates how to build a Go-Application that does not use Go modules.
- a-team/myredis: Demonstrates an application that creates a docker image as build artifact which is uploaded by baur to a docker registry.
- project-pink-einstein/unixtime: Demonstrates how a C-Application can be build with baur.
- project-pink-einstein/rng: Demonstrates how to run build, test and check tasks for a Go-Application and the use of baur include files.
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.
The following applications needs to be installed to experiment with baur in the example repository:
- Git
- Go
- Bash
- Make
- Docker or buildah
-
Clone the repository:
git clone [email protected]: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.
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