Maestro¶
Maestro is a PHP tool for automating package maintainence.
It is intended for people who maintain package ecosystems - that is many packages which are related in someway.
It can be used to:
- Syncrhonise package configuration
- Run tasks (such as test tools, migration tools, etc)
- Run your test suites
- Tag releases
- Perform surveys (e.g. the version state of a package)
- Generate reports
- Do other things…
In general it will checkout your package repositories and perform tasks on them in parallel.
You start by creating a maestro.json
configuration file:
{
"nodes": {
"maestrophp/example-math": {
"type": "package",
"args": {
"url": "https://github.com/maestrophp/example-math"
},
"nodes": {
"composer.json": {
"type": "json_file",
"args": {
"targetPath": "composer.json",
"data": {
"require-dev": {
"phpunit/phpunit": "^7.0"
}
}
}
},
"composer install": {
"type": "script",
"args": {
"script": "composer install"
},
"depends": [ "composer.json" ]
}
}
},
"maestrophp/example-science": {
"type": "package",
"args": {
"url": "https://github.com/maestrophp/example-science"
},
"nodes": {
"composer.json": {
"type": "json_file",
"args": {
"targetPath": "composer.json",
"data": {
"require-dev": {
"phpunit/phpunit": "^7.0"
}
}
}
},
"composer install": {
"type": "script",
"args": {
"script": "composer install"
},
"depends": [ "composer.json" ]
},
"phpunit": {
"type": "script",
"args": {
"script": "./vendor/bin/phpunit --version"
},
"depends": [ "composer install" ]
}
}
}
}
}
Which is turned into a graph:
Which is executed:
Note
In a real configuration we would use prototypes
to avoid
repeating configuration for each package.