PHPackages                             icanhazstring/duck-pony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. icanhazstring/duck-pony

ActiveLibrary

icanhazstring/duck-pony
=======================

Secret Duck Pony

0.7.0(3y ago)5608[2 issues](https://github.com/icanhazstring/duck-pony/issues)MITPHPPHP ^8.1

Since Mar 4Pushed 3y ago3 watchersCompare

[ Source](https://github.com/icanhazstring/duck-pony)[ Packagist](https://packagist.org/packages/icanhazstring/duck-pony)[ RSS](/packages/icanhazstring-duck-pony/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (15)Versions (15)Used By (0)

duck-pony
=========

[](#duck-pony)

`duck-pony` is a little maintenance tool used to manage integration server instances. It is linked to Atlassian Jira to retrieve information of what actions to perform.

These actions include

- CleanBranch
- CleanMySQLDatabase
- PurgeService
- RemoveOrphanedSymlinks

Installation
============

[](#installation)

To use this tool simply clone or download it onto your integration server.

> Be aware that some commands needs some kind of `root` execution rights (e.g. to shutdown a service using `systemctl`)

Start by using composer to install all needed packages. (You might want to skip dev packages)

```
$ composer install --no-dev
```

To configure your `config.yml` use [icanhazstring/tempa-php](https://github.com/icanhazstring/tempa-php) which is included in this tool.

```
$ vendor/bin/tempa file:substitute \
    config/ \
    tempa.json \
    jira_host=JIRA_HOST \
    jira_username=JIRA_USER \
    jira_password=JIRA_PASSWORD \
    pattern=BRANCH_PATTERN_REGEX \
    db_host=DB_HOST \
    db_username=DB_USER \
    db_password=DB_PASSWORD \
    instance_pattern=SYSTEMD_SERVICE_PATTERN \
    slack_token=SLACK_TOKEN \
    slack_channel=SLACK_CHANNEL
```

> The `pattern` is used to identify tickets and folders alike. This means, your folders **MUST** have the same name as the ticket in your jira board.

> If slack\_token and slack\_channel are set, logged messages with a level of critical or higher will be sent to this slack channel

Commands
========

[](#commands)

CleanBranch
-----------

[](#cleanbranch)

```
$ bin/dp folder:clean --help

Description:
  Scan folder an clean branches

Usage:
  folder:clean [options] [--]

Arguments:
  folder                 Folder
  branchname-filter      Remove parts of the folder name to match jira ticket

Options:
  -s, --status=STATUS          Status
  -p, --pattern=PATTERN        Branch pattern
      --keep-days[=KEEP-DAYS]  The number of days a branch is allowed to remain.
  -i, --invert                 Invert status
  -y, --yes                    Confirm questions with yes
  -c, --config=CONFIG          Config [default: "/home/vendor/duck-pony/config/config.yml"]
  -f, --force                  Force delete
  -h, --help                   Display this help message
  -q, --quiet                  Do not output any message
  -V, --version                Display this application version
      --ansi                   Force ANSI output
      --no-ansi                Disable ANSI output
  -n, --no-interaction         Do not ask any interactive question
  -v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  --branchname-filter          Remove parts of the branchname for better jira ticket matching

Help:
  Scan folder iterate over sub folders and removes
  them under certain conditions
```

**Example**: Clean every branch that is currently **not** "in progress", "reopened", "todo" or "in review".

```
$ bin/dp folder:clean /path/to/folder --status="reopened,open,in progress,in review" --invert --yes
```

PurgeService
------------

[](#purgeservice)

```
Description:
  Scan folder an purge services with same name

Usage:
  service:purge [options] [--]

Arguments:
  folder                 Deployment folder as reference

Options:
  -u, --unit=UNIT        Name of unit
  -p, --pattern=PATTERN  Instance pattern
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Disables and stops systemd services that have
  no reference folder in given folder argument
```

**Example**: Purge every `awesome` service from systemd which is not present in scanned folder Assuming the following folder structure and services:

```
/path/to/folder
 |- ABC-123

systemd services:
- awesome@ABC-124
- awesome@ABC-125

```

Executing this command:

```
$ bin/dp service:purge /path/to/folder --unit=awesome@'
```

Will remove the following systemd services:

- awesome@ABC-124
- awesome@ABC-125

RemoveOrphanedSymlinks
----------------------

[](#removeorphanedsymlinks)

```
Description:
  Removes orphaned symlinks of a given folder

Usage:
  symlinks:remove_orphaned

Arguments:
  folder                Folder

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Removes only orphaned symlinks under a given folder without any recursion.
```

Example: Remove every orphaned symlink under nginx site-enabled

```
$ bin/dp symlinks:remove_orphaned /etc/nginx/sites-enabled
```

CleanMySQLDatabase
------------------

[](#cleanmysqldatabase)

```
$ bin/dp db:clean --help

Description:
  Scans Database and cleans orphaned

Usage:
  db:clean [options] [--]

Arguments:
  branchname-filter      Remove parts of the folder name to match jira ticket

Options:
  -s, --status=STATUS    Status
  -p, --pattern=PATTERN  Branch pattern
  -i, --invert           Invert status
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Scans MySQL Databases and removes
  them under certain conditions
```

**Example**: Clean every database of tickets that are currently **not** "in progress", "reopened", "todo" or "in review".

```
$ bin/dp db:clean --status="reopened,open,in progress,in review" --invert rsv_feature- rsv_bugfix-
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~275 days

Total

13

Last Release

1168d ago

PHP version history (3 changes)0.4PHP ^7.1

0.6.2PHP ^7.2

0.7.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd1997b796c59d155bbaedeffafd15f61ab16f2d469824d77859e9918931de47?d=identicon)[icanhazstring](/maintainers/icanhazstring)

---

Top Contributors

[![icanhazstring](https://avatars.githubusercontent.com/u/883543?v=4)](https://github.com/icanhazstring "icanhazstring (12 commits)")[![CiderAndWhisky](https://avatars.githubusercontent.com/u/30117084?v=4)](https://github.com/CiderAndWhisky "CiderAndWhisky (7 commits)")[![d-feller](https://avatars.githubusercontent.com/u/14861458?v=4)](https://github.com/d-feller "d-feller (6 commits)")[![doganoo](https://avatars.githubusercontent.com/u/6998611?v=4)](https://github.com/doganoo "doganoo (4 commits)")[![smuggli](https://avatars.githubusercontent.com/u/5166759?v=4)](https://github.com/smuggli "smuggli (4 commits)")[![marc-heister-check24](https://avatars.githubusercontent.com/u/167176056?v=4)](https://github.com/marc-heister-check24 "marc-heister-check24 (3 commits)")[![demichl68](https://avatars.githubusercontent.com/u/4621362?v=4)](https://github.com/demichl68 "demichl68 (2 commits)")

---

Tags

jiramaintenancephpserversystemctl-phptempa-php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/icanhazstring-duck-pony/health.svg)

```
[![Health](https://phpackages.com/badges/icanhazstring-duck-pony/health.svg)](https://phpackages.com/packages/icanhazstring-duck-pony)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
