{"id":17226802,"url":"https://github.com/dantleech/maestro2","last_synced_at":"2025-04-14T01:12:54.243Z","repository":{"id":55505923,"uuid":"318910097","full_name":"dantleech/maestro2","owner":"dantleech","description":"Repository Management System for PHP","archived":false,"fork":false,"pushed_at":"2021-01-07T08:30:38.000Z","size":874,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T01:12:43.407Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dantleech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-05T23:27:23.000Z","updated_at":"2024-03-16T17:52:08.000Z","dependencies_parsed_at":"2022-08-15T02:00:45.771Z","dependency_job_id":null,"html_url":"https://github.com/dantleech/maestro2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fmaestro2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fmaestro2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fmaestro2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fmaestro2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dantleech","download_url":"https://codeload.github.com/dantleech/maestro2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804825,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T04:17:16.401Z","updated_at":"2025-04-14T01:12:54.220Z","avatar_url":"https://github.com/dantleech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Maestro2\n========\n\n![CI](https://github.com/dantleech/maestro2/workflows/CI/badge.svg?branch=master)\n\nMaestro2 is a Repository Manager System for PHP.\n\nThink of it like Ansible for repositories.\n\n- Perform upgrades on multiple packages.\n- Standardize configuration accross repositories.\n- Run CI\n- Conduct surveys (discover latest tags, CI status etc)\n\nThis project is a work-in-progress.\n\nHow It Works\n------------\n\nMaestro is essentially a concurrent task runner which is conveniently adapted\nfor working with repositories.\n\nIt is your job to create a _pipeline_ class. This class will be instantiated\nand passed the _configuration node_, and it must return a _task_. This _task_\ncan be an aggregate of many tasks.\n\nConfiguration\n-------------\n\n### `maestro.json`\n\nThis is the main configuration file, which can look something like:\n\n```\n{\n    \"core.inventory\": [\n        \"example/inventory.json\",\n        \"example/secrets.json\"\n    ],\n    \"core.templatePath\": \"example/templates\",\n    \"core.workspacePath\": \"var\",\n    \"core.concurrency\": 10\n}\n```\n\nThe inventory files are where we define our repositories and variables:\n\n```\n{\n    \"vars\": {\n        \"jobs\": [\n            \"php-cs-fixer\",\n            \"phpstan\",\n            \"phpunit\"\n        ],\n        \"defaultBranch\": \"master\"\n    },\n    \"repositories\": [\n        {\n            \"name\": \"maestro\",\n            \"url\": \"git@github.com:dantleech/maestro2\",\n            \"vars\": {\n                \"jobs\": [\n                    \"psalm\",\n                    \"phpunit\"\n                ]\n            }\n        },\n        {\n            \"name\": \"worse-reflection\",\n            \"url\": \"git@github.com:phpactor/worse-reflection\"\n        }\n    ]\n}\n```\n\nThe inventory files will be merged and cast into configuration nodes which can\nbe used by pipelines.\n\nPipelines\n---------\n\nCreate a pipeline and ensure that it is autoloadable, for example:\n\n```php\n\u003c?php\n// example/EmptyPipeline.php\n\nnamespace Maestro\\Examples\\Pipeline;\n\nuse Maestro\\Core\\Inventory\\MainNode;\nuse Maestro\\Core\\Pipeline\\Pipeline;\nuse Maestro\\Core\\Task\\NullTask;\nuse Maestro\\Core\\Task\\SequentialTask;\nuse Maestro\\Core\\Task\\Task;\n\nclass EmptyPipeline implements Pipeline\n{\n    public function build(MainNode $mainNode): Task\n    {\n        return new SequentialTask([\n            new NullTask(),\n        ]);\n    }\n}\n```\n\nYou can then run it with:\n\n```\n$ ./vendor/bin/maestro run pipeline/EmptyPipeline.php\n```\n\nThis does very little - in fact it will do nothing as all we did was specify a\n_reporting group_ for subsequent tasks, followed by the `NullTask`.\n\nFor working examples see the `example` directory in this project.\n\nThere are many tasks which you can add (including aggregate tasks to run more\ntasks sequentially or in parallel). These can be found as implementations of\n`Maestro\\Core\\Task\\Task` (and also found in the same namespace).\n\nDocumentation\n-------------\n\nYou will be able to read the documentation [here](https://dantleech.github.io/maestro2).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fmaestro2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdantleech%2Fmaestro2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fmaestro2/lists"}