Skip to main content

Simple YAML-driven build or task runner

Project description

Bou (pronounced “bow”) is a simple builder or task runner which uses a YAML file for task configuration.

Bou uses the concept of stages and steps. A stage is a sets of steps, and a step is a set of commands to run. A stage can contain many steps, but a step can only belong to a single stage.

“Bou” is Afrikaans for “build”.

Installation

Install bou with pip:

$ pip install bou

Running bou

To run bou, simply run the command. The build file will be automatically detected.

$ bou

To specify a build configuration file, use the -f option.

$ bou -f /path/to/build.yaml

To specify a stage or a step to run, just add it to the command. Stages take priority over steps, so if you have a stage and a step with the same name, the stage will be run.

$ bou build
$ bou test

Task Configuration

When run without any parameters, bou will search for a file named bou.yaml, bou.yml, build.yaml or build.yml

Here’s a basic example:

stages:
  - build
  - test
steps:
  build:
    stage: build
    script:
      - make
  test:
    stage: test
    script:
      - make test

Environment Variables

Bou also supports setting environment variables, both at a global level, as well as at a step level. As a convenience, bou sets up an initial environment variable named BASE_DIR which is the directory the build file is in.

Environment variables defined at a global level are set first when a step is run, and then the step-level environment variables are set.

stages:
  - build
environment:
  - PYTHON=python3
steps:
  build:
    stage: build
    environment:
      - SOURCE=$BASE_DIR/src
    script:
      - $PYTHON $SOURCE/setup.py build

Stages and Steps

If no steps or stages are specified, by default bou will attempt to run the following, in order:

  1. All of the stages in the stages section of the task configuration

  2. If no stages are specified in the task config, all of the stages discovered in the steps

  3. If no stages are found, all of the steps

Source Code

The source code to bou is available on my personal Git server: https://git.snyman.info/raoul/bou

Copyright (c) 2021 Raoul Snyman

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bou-0.0.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

bou-0.0.2-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file bou-0.0.2.tar.gz.

File metadata

  • Download URL: bou-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for bou-0.0.2.tar.gz
Algorithm Hash digest
SHA256 14c0af1ab482521157e895fef5e1f82323f61e67021d4408712622d19412f333
MD5 bc754f62436dd3196050fe7fc3ed7d52
BLAKE2b-256 c4639b015e251cd7f120ce3ebabccf9f092eb8042793ff889b616ddc53a1743b

See more details on using hashes here.

File details

Details for the file bou-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: bou-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for bou-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c23792d48a70e4b52477688d95d4066a6d607239a75acfca85531db61af6d601
MD5 57c26aa2b530922fa729cb45a0dcfdc4
BLAKE2b-256 34d7b7fa82ed27aaf142ceaa0558449b0fd967d6e8194c78965d6af29a31d705

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page