
Use dry-run to verify how Jenkins pipeline constructs (agents, environment, stages/steps) are mapped to GitHub Actions concepts (
runs-on, env, jobs/steps) before committing any changes.Always provide the full Jenkins job URL and an output directory you control. The dry-run will not change your repo, but incorrect URLs or output paths can cause confusing results or missed files.
Command usage
Provide the Jenkins job URL and an output directory to write the generated workflows:/job/<name>/ where applicable) and an output directory path that you control.
What the dry-run produces
The dry-run generates files representing the GitHub Actions workflows equivalent to the given Jenkins pipeline. It preserves any items that the importer cannot automatically translate as commented entries in the YAML output so you can review them and implement custom handling. Below is an example showing an original Jenkins Declarative Pipeline and the generated GitHub Actions workflow produced by a dry-run. Original Jenkins pipeline (Declarative Pipeline syntax):environment and agent.label map to env and runs-on. Items the importer could not translate (for example, sleep 80) are left as commented placeholders near where they would have been handled.
Common mappings
The importer converts many Jenkins constructs to GitHub Actions equivalents. The table below summarizes typical mappings and examples.| Jenkins construct | GitHub Actions equivalent | Example |
|---|---|---|
agent (label) | runs-on | label 'TeamARunner' → runs-on: ['self-hosted', 'TeamARunner'] |
environment | env | DISABLE_AUTH = 'true' → env: DISABLE_AUTH: 'true' |
stages / steps | jobs / steps | stage('build') { steps { ... } } → jobs.build.steps: [...] |
| Test publishing | Actions or community actions | junit '**/target/*.xml' → uses: EnricoMi/publish-unit-test-result-action@v1.7 |
Notes on partial conversions
- Many Jenkins constructs map directly to GitHub Actions concepts (agents ->
runs-on,environment->env, stages/steps -> jobs/steps). - When a Jenkins construct has no matching transformer (for example,
sleep 80), the importer leaves a commented representation in the generated YAML so you can review and implement the desired behavior manually. - Commented placeholders in the YAML make it clear where custom handling is required and where to add your own steps or actions.
- The generated workflow includes best-effort substitutions (for example,
self-hosted+ label for custom runners) but you should reviewruns-onand runner labels to ensure they match your GitHub-hosted or self-hosted runner setup.
Next steps
- Review the generated files in the
--output-dirand confirm the mappings forenv,runs-on, job dependencies (needs), and test publishing. - Create custom transformers for Jenkins constructs that need automatic translation (for example, converting
sleepinto an equivalent step usingtimeoutor a small script). - When satisfied with the dry-run output, run the importer without
dry-runto generate real workflow files and open a pull request.