Harmont docs
Getting started

Your first run

A complete Hello World pipeline, end to end.

1. Define the pipeline

Drop this in your repo as .harmont-pipeline.py:

.harmont-pipeline.py
from harmont import pipeline, command

@pipeline
def ci():
    command("echo hello", label=":wave: greet")
    command("python -m pytest", label=":python: test")

The Python DSL transpiles to Scheme s-expressions, which harmont-eval turns into the JSON pipeline contract.

2. Run it

hm run

You'll see (truncated):

Uploading working tree (124 files, 1.8 MB)... done in 320ms.
Build #14 created. Streaming logs.

  greet      ✓  0.1s
  test       ✓  3.4s

Build passed in 3.7s.

3. View it in the dashboard

The build URL is printed at the end of hm run. Open it. The dashboard mirrors Buildkite's pipeline → build → job → step hierarchy.

What just happened

  1. hm packed the working tree (respecting .gitignore and .harmontignore).
  2. POSTed the bundle to harmont-api.
  3. harmont-api shelled out to harmont-eval to turn .harmont-pipeline.py into the JSON pipeline contract.
  4. The API enqueued jobs, leased a Freestyle sandbox, ran each step, and streamed logs over the websocket.

For more on the pipeline contract, see DSL.

On this page