pipemaster

Move your CI to another provider. See exactly what does not move.

pipemaster converts pipeline definitions between nine CI/CD providers, in every direction. For each feature your pipeline uses, it gives one verdict. A feature that the target cannot express is reported and kept for the trip back, never dropped silently.

Pre-alpha. MIT licence. Written in Go, ships as one static binary.

native

The target has the same construct. The feature carries over as is.

emulated

The target gets an equivalent built from other features. A # pipemaster:emulated comment marks it in the file.

external

The target keeps the feature outside the pipeline file. The report says what to set up.

lost

The target cannot express it. The report names it, and the metadata keeps it for the return trip.

$ pipemaster convert ./repo --to <provider>

One GitHub Actions workflow, eight targets

The current code produced every file and report below. A test regenerates them from testdata/site and fails when this page and the converter disagree. Each target also ran a round trip back to GitHub Actions.

GitHub Actions .github/workflows/ci.yml

    

Loss report

    Only entries that are not plainly native appear in a report. The metadata file .pipemaster/meta.yaml is written beside the output and is not shown here.

    $ pipemaster detect ./repo

    Nine providers, one representation

    Every provider has one parser and one emitter. A new provider adds a parser, an emitter and a capability matrix, and changes no other provider. The bar under each card counts the verdicts that provider declares as a target, over every feature.

    $ pipemaster caps --to <provider>

    What each target does with each feature

    Rows are the features of the intermediate representation. Columns are targets. Select a cell to read the strategy or the reason. The same data comes from pipemaster caps --to <provider>.

    nativeemulatedexternallost
    Feature support per target provider

    Select a cell.

    $ pipemaster inspect ./repo

    One representation in the middle

    Nine providers connect to one intermediate representation in the centre. gha gitea forgejo gitlab woodpecker drone tekton argo concourse IR
    1. Parse

      The parser of the source provider reads the files into the shared intermediate representation. A key that no IR field models goes into a per-provider extension, so the parser loses nothing.

    2. Emit

      The emitter of the target checks its capability matrix for every IR node. It writes the native form, builds an emulation, or records the gap.

    3. Report

      Every decision that is not native becomes a report entry with the IR path, the feature, the verdict and the reason. --strict exits with code 3 when any entry exists.

    4. Return

      The metadata file stores what the target cannot hold. Convert back and the source returns exactly. Chains such as GitHub Actions to GitLab CI to Gitea Actions to GitHub Actions return too, one layer per hop. An edited file makes the trip back stop with exit code 4.

    $ make check && make chains && make lint-real

    How the claims are checked

    Round-trip matrix

    The tests convert every feature fixture through every provider pair and back, and compare the IR. The full chain matrix runs three-provider chains such as A to B to C to A, with sidecar and embedded metadata.

    Real public pipelines

    A corpus of 83 public pipelines with compatible licences, attributed in testdata/corpus/SOURCES.md, goes through the same conversions.

    The real linters

    Every emitted file passes the pinned schema of its provider. make lint-real also runs actionlint, woodpecker-cli, drone, kubeconform, argo and fly validate-pipeline --strict on the output.

    A Lean 4 model

    A Lean 4 model of the IR and the adapters proves round trips (for example cross_roundtrip and chain_roundtrip), DAG layering and matrix expansion. The model generates test vectors that the Go tests must match. The proofs are about the model, not the Go code.

    $ go build ./cmd/pipemaster

    Build it, then convert

    No release is published yet. Build the binary from a checkout with Go 1.27.

    $ git clone https://github.com/lukaszraczylo/pipemaster
    $ cd pipemaster && go build -o pipemaster ./cmd/pipemaster
    
    $ ./pipemaster convert ./repo --to gitlab -o ./out --report md
    $ ./pipemaster roundtrip ./repo --via gitlab
    no differences
    $ ./pipemaster roundtrip ./repo --from gha --via gitlab,gitea
    no differences
    CommandPurpose
    detect <dir>List the providers whose config exists in the directory.
    inspect <dir>Print the intermediate representation.
    convert <dir> --to PConvert the pipelines and print the loss report.
    roundtrip <dir> --via PConvert there and back, then print any differences.
    caps [--from P] --to PPrint the feature support of a target, or compare two providers.
    validate <dir> --as PCheck pipeline files against the schema of a provider.
    ExitMeaning
    0The command succeeded.
    1The command failed with an error.
    2The command line is wrong.
    3--strict is set and a feature is not native.
    4The round-trip metadata is stale. Use --force to convert anyway.

    Secret names map between providers. Secret values, runner registration, webhooks and branch protection do not move: the report lists what to set up by hand.