Skip to main content

Migrate your CI/CD pipelines from Jenkins to GitLab.

Project description

butler2fox logo

pypi python

Butler2Fox

Butler2Fox is a CLI tool that helps you migrate your CI/CD pipelines from Jenkins to GitLab.
It automatically converts your Jenkinsfile into the equivalent .gitlab-ci.yml.

[!IMPORTANT] Scope and Limitations

  1. Among the different ways to define a Jenkins pipeline, Butler2Fox only supports the Declarative Pipeline syntax.

  2. Currently, Butler2Fox does not support Groovy code (script steps and any free-form Groovy statements). These unsupported code blocks will be copied as-is into the generated .gitlab-ci.yml, preceded by a warning comment:

    # 🚨 NOT MIGRATED: unsupported Groovy
    

Install

Butler2Fox requires Python 3.12 or higher and can be installed using pip package manager:

pip install butler2fox

Usage

usage: butler2fox [-h] [--debug] [--no-color] [-i INPUT] [-o OUTPUT] [-nc NAMING_CONVENTION]

This tool can be used to migrate your Jenkins pipelines to GitLab CI/CD

options:
  -h, --help            show this help message and exit
  --debug               Enable debugging
  --no-color            Disable colored output
  -i INPUT, --input INPUT
                        Input Jenkinsfile (default: stdin)
  -o OUTPUT, --output OUTPUT
                        Output GitLab CI YAML file (default: same dir as input or stdout)
  -nc NAMING_CONVENTION, --naming-convention NAMING_CONVENTION
                        Jobs and stages naming convention (one of 'unchanged', 'snake', 'kebab', 'camel' or 'pascal')

Initial inspirations

Developers

Butler2Fox is developed in Python (3.12 or higher), and is based on Poetry as packaging and dependency management system:

# install dependencies
poetry install

# run the tool
poetry run butler2fox ...

It uses Ruff for formatting and linting:

# format code
poetry run ruff format

# lint (and fix) code
poetry run ruff check --fix

And it uses pytest for unit testing:

# run tests
poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

butler2fox-1.0.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

butler2fox-1.0.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file butler2fox-1.0.0.tar.gz.

File metadata

  • Download URL: butler2fox-1.0.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.10 Linux/6.14.0-33-generic

File hashes

Hashes for butler2fox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9ac3b43d118f17d0b89950351617ff8d035c217f664959ac951bf6ade9287f9b
MD5 01e6b574c1938893e8e0e5c9286126b1
BLAKE2b-256 01173ef9b8fed78a5157181cfe27e654c751abf23704083d38e19179d5b8de10

See more details on using hashes here.

File details

Details for the file butler2fox-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: butler2fox-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.10 Linux/6.14.0-33-generic

File hashes

Hashes for butler2fox-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd552d73b6f663d814259dfd790dc77f96914755620559ad4b0a19e6e2ac2763
MD5 e7c79528b03ad2326643049cb7f3a5f7
BLAKE2b-256 3559f63eefea8c07f121fb44cd4a35e316872168350fc83a99641f9b9f731119

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page