> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipelines: import from other CI

> Convert GitHub Actions workflows and declarative Jenkinsfiles into pipeline files, with a report that accounts for every construct.

`pipelines import` reads CI files on your machine and writes [pipeline](https://docs.levelrail.com/pipelines.md) files plus a report. It never contacts a server and never runs anything from the input.

```sh theme={"dark"}
levelrail-cli pipelines import github . --out ./.pipelines
levelrail-cli pipelines import jenkins ./Jenkinsfile --strict
```

Pass one file or a directory. For `github`, a repository root reads `.github/workflows`. For `jenkins`, a directory reads `Jenkinsfile` and `*.jenkinsfile`. Without `--out` the pipelines go to stdout and the report to stderr.

| Flag | Meaning |
| - | - |
| `--out DIR` | Write the pipeline files, `import-report.md` and `import-report.json`. |
| `--strict` | Exit non-zero when anything is unsupported. |
| `--image IMAGE` | Job image used for hosted runners and `agent any`. Default `ubuntu:24.04`. |
| `--force` | Replace existing files in `--out`. |
| `--json` | Print the report as JSON. |

## Read the report

Every construct gets a row with its file and line:

* `mapped`: converted.
* `partial`: converted, with a difference described in the note.
* `unsupported`: not converted.

An unsupported step becomes a step that fails, so a converted pipeline cannot pass while skipping work. An unsupported condition becomes `if: "false"`. A trigger with a filter that has no equivalent is left off, so the pipeline never starts more often than before.

Secrets are referenced by name only. The report lists the secrets to create on the app. A variable with a credential-like name and a hardcoded value becomes a secret reference. Values written directly inside scripts are copied as part of the script, so review the output before you commit it.

## GitHub Actions

| Source | Result |
| - | - |
| `push`, `pull_request`, tags, `schedule`, `workflow_dispatch`, `merge_group` | `on` |
| `jobs`, `needs`, `env`, `timeout-minutes`, `continue-on-error`, `container` | same fields |
| `strategy.matrix` with literal lists | `matrix` |
| `if` using comparisons and status functions | `if` |
| `concurrency` | `concurrency` |
| `environment` | an approval step |
| `actions/checkout` | built in checkout |
| `actions/cache` | cache on the next run step |
| `actions/upload-artifact`, `download-artifact` | artifact steps |

Other actions, reusable workflows, service containers, permissions and Windows or macOS runners are unsupported. YAML aliases are rejected.

## Jenkins

Only declarative pipelines are converted. A scripted pipeline is reported as unsupported as a whole.

| Source | Result |
| - | - |
| consecutive `stage` blocks with the same image | steps of one job, so they share a workspace |
| `parallel` | separate jobs |
| `sh`, `echo`, `checkout scm`, `timeout`, `retry`, `dir`, `withEnv` | steps |
| `environment`, `credentials()` | `env`, secret references |
| `when` with `branch`, `buildingTag`, `changeRequest`, `not`, `allOf`, `anyOf` | `if` |
| `input` | an approval step |
| `post` | one job per condition, after all stages |
| `parameters`, `cron` without `H` | `parameters`, `on.schedule` |

`script` blocks, shared libraries, `tools` and plugin steps are unsupported.

## Limits

Inputs are capped. Override with `APP_CI_IMPORT_MAX_BYTES` (512 KiB per file), `APP_CI_IMPORT_MAX_DEPTH` (40), `APP_CI_IMPORT_MAX_NODES` (20000) and `APP_CI_IMPORT_MAX_FILES` (100).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.