
- Fetches Jenkins job configuration (
config.xml) from the Jenkins API. - Attempts to convert Jenkinsfiles to a JSON intermediate representation using the pipeline-model-converter.
- Generates per-job artifact directories under
tmp/audit/<job>/containing converted GitHub Actions workflows, JSON job metadata, original Jenkinsfiles (if available), and diagnostic files (e.g.,error.txt) when conversion fails. - Redacts secrets in any exported output files.
tmp/audit/. Typical contents include:
Generate ASCII Artwork — config.json
The exporter translates the Jenkins job configuration into JSON. For this job the
config.json shows a shell builder that calls an external Advice API.
cowsay, and print the message with a random cow. Note how filenames were normalized (e.g., writing to advice.json) to match the generated workflow layout.
config.json. The Jenkins SCM trigger shows up as a cron-like schedule in the JSON:
- Implement a custom transformer to map the Jenkins plugin to a GitHub Action, or
- Rework that pipeline step manually in the generated workflow using equivalent Actions or scripts.
config.json (so you have the original pipeline script and metadata) and writes an error.txt describing the limitation.
Scripted Jenkins pipelines are not supported by the importer. Jobs using scripted pipelines must be migrated manually to GitHub Actions or rewritten as declarative pipelines for automated conversion.
config.json captured for a scripted pipeline:
error.txt produced by the importer:
- Start with declarative pipelines and plugin-dependent steps; those convert more cleanly.
- Inspect
tmp/audit/<job>/for each job: review.github/workflows/*.yml, resolve commented/unmapped sections, and adjust secrets or environment variables. - For jobs with
error.txt, plan a manual migration or pipeline refactor to declarative form. - Consider implementing custom transformers for frequently-used proprietary plugins to automate parts of the migration.
Links and references
- GitHub Actions Documentation
- Jenkins Documentation
- Pipeline Model Definition Plugin (Jenkins)
- Consider scanning or auditing generated workflows with repository-specific CI checks and tests after import.
- The audit fetches Jenkins job configurations and Jenkinsfiles, calls the pipeline-model-converter to produce an intermediate JSON representation, and writes converted artifacts into
tmp/audit/<job>/. - Per-job output commonly includes
.github/workflows/*.yml,config.json,jenkinsfile, anderror.txt(for failed conversions). - Declarative pipelines convert best; plugin-specific or unsupported features are left commented in the generated YAML and require manual attention or custom transformers.
- Scripted pipelines are not automatically converted and must be migrated manually.