Skip to main content

A CLI utility to detect if a project requires a deployment based on a .deployignore file

Project description

Deploy Skipper 🚀

Smart, zero-dependency deployment gating for your CI/CD pipeline. Stop deploying when nothing meaningful changed — save time, reduce errors, and speed up your workflow.


Why Deploy Skipper?

Imagine running a deployment every time any file changes, even trivial docs or images. Wasted time, wasted resources, and unnecessary production churn.

Deploy Skipper intelligently decides whether a deployment is necessary by checking your changed files against blacklist & whitelist rules, giving you full control over what triggers your CI/CD.


Features

  • Blacklist + Whitelist Support Ignore irrelevant files (*.md, images/*) while explicitly allowing critical ones (config/settings.yaml).

  • Git-Aware Automatically diffs against commits, branches, or the most recent tag.

  • Recursive & Flexible Globs Supports *, **, and directory patterns (dir/*) out-of-the-box.

  • Zero Dependencies Pure Python 3 — no external libraries required.

  • Verbose & JSON Modes See exactly which files matched patterns and whether they will trigger a deploy.

  • CI/CD Friendly Exit codes map perfectly to CI logic:

    • 0 → deploy (relevant changes found)
    • 1 → skip (only ignored changes)
    • 2 → error/misconfiguration

Installation

Option 1: Standalone script

curl -O https://raw.githubusercontent.com/philsupertramp/deploy_skipper/main/deploy_skipper.py
chmod +x deploy_skipper.py
./deploy_skipper.py

Optionally, you can also build the executable yourself

curl -O https://raw.githubusercontent.com/philsupertramp/deploy_skipper/main/deploy_skipper.py
python -m venv
. venv/bin/activate
pip install pyinstaller
pyinstaller --onefile deploy_skipper.py

# this builds into ./dist
./dist/deploy_skipper --help

Option 2: Install via pip (recommended)

pip install deploy_skipper
deploy_skipper

Once installed, the deploy_skipper command is available.


Usage

# Diff against previous commit
deploy_skipper

# Diff against the most recent tag
deploy_skipper --tag

# Diff against a specific commit
deploy_skipper --ref 3f4e2a1

# Use a custom ignore file
deploy_skipper --ignore-file .mydeployignore

# See verbose output of what triggered the deploy
deploy_skipper --verbose

.deployignore Format

  • Blacklist patterns (ignored files) – default: lines without !
  • Whitelist patterns (un-ignore files) – prefix lines with !
# Ignore all markdown files
*.md

# Ignore images
images/*

# Ignore everything in build/ but allow a critical config
build/*
!build/config.json

# Ignore all JS but allow main.js
src/**/*.js
!src/main.js

Whitelist always wins. Even if a file matches a blacklist pattern, if it’s in the whitelist, it will trigger a deploy.


Examples

Skip deployment for docs-only changes

# .deployignore
*.md
docs/*

# Git changes
git diff HEAD~1 --name-only
README.md
docs/setup.md
deploy_skipper --verbose
# Output:
# README.md: matched blacklist pattern '*.md' -> IGNORED
# docs/setup.md: matched blacklist pattern 'docs/*' -> IGNORED
# All changes are ignored by blacklist/whitelist rules; skipping deployment.

✅ Result: CI/CD skips deploy, saving time.


Trigger deployment for config changes

# .deployignore
*.md
!config/settings.yaml

# Git changes
git diff HEAD~1 --name-only
README.md
config/settings.yaml
deploy_skipper --verbose
# Output:
# README.md: matched blacklist pattern '*.md' -> IGNORED
# config/settings.yaml: matched whitelist pattern 'config/settings.yaml' -> RELEVANT
# Relevant changes detected, proceeding with deployment:
#   config/settings.yaml

✅ Result: CI/CD triggers deploy, as intended.


Integration Tips

  • GitHub Actions / GitLab CI / Jenkins Use the exit code directly:

    - name: Check if deployment is needed
      run: deploy_skipper
    
  • Dry run for debugging (verbose output shows exactly what is happening)

  • Combine with caching & notifications for maximum CI efficiency


Why You’ll Love It

  • Save hours of unnecessary deployments
  • Reduce deployment-related errors
  • Full control over what changes actually matter
  • Transparent & easy-to-read logs
  • Works on any platform with Python 3

Contribute

We welcome PRs, suggestions, or improvements!

  • Add support for JSON output for machine-readable CI logs
  • Improve pattern matching rules for edge cases
  • Add integration templates for popular CI/CD systems

License

MIT License – use freely in personal or commercial projects.

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

deploy_skipper-0.0.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

deploy_skipper-0.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file deploy_skipper-0.0.1.tar.gz.

File metadata

  • Download URL: deploy_skipper-0.0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deploy_skipper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ebbd6aca9790059420c1b262494a2ae813fd047bfeda062744532303f4d0cb65
MD5 7f6a36202655801adf47df8ce5ad35e2
BLAKE2b-256 315463862d2bb98b710b4db477140b95ee51cc77ace5866737169d0ffe95201c

See more details on using hashes here.

File details

Details for the file deploy_skipper-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: deploy_skipper-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deploy_skipper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d820af275c9826083ccce23997f59f60accf9b19f9008b71d6a811ee291c886
MD5 5fb24fe08c99618352e61abaa7a4ac12
BLAKE2b-256 d2bf68a19f8b0636553d61ad672cc32a62fcd591d1cbc5c5f2d7f61cb608932b

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