{"id":17696905,"url":"https://github.com/datashaman/larabuild","last_synced_at":"2026-01-23T12:21:28.666Z","repository":{"id":39557095,"uuid":"172198551","full_name":"datashaman/larabuild","owner":"datashaman","description":"CI / CD server running on Laravel with a GraphQL API. Local and docker execution (experimental). Built for LaraHack #3 2019.","archived":false,"fork":false,"pushed_at":"2023-01-03T17:23:29.000Z","size":4690,"stargazers_count":9,"open_issues_count":37,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-25T10:47:04.631Z","etag":null,"topics":["build-system","cd","ci","continuous-deployment","continuous-integration","docker","graphql","larahack"],"latest_commit_sha":null,"homepage":"","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/datashaman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-23T09:58:50.000Z","updated_at":"2024-07-01T09:16:39.000Z","dependencies_parsed_at":"2023-02-01T08:15:28.366Z","dependency_job_id":null,"html_url":"https://github.com/datashaman/larabuild","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Flarabuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Flarabuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Flarabuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Flarabuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datashaman","download_url":"https://codeload.github.com/datashaman/larabuild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222688211,"owners_count":17023296,"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":["build-system","cd","ci","continuous-deployment","continuous-integration","docker","graphql","larahack"],"created_at":"2024-10-24T14:45:39.607Z","updated_at":"2026-01-23T12:21:28.600Z","avatar_url":"https://github.com/datashaman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaraBuild\n\n![Development Status](https://img.shields.io/badge/status-alpha-red.svg)\n[![Build Status](https://travis-ci.org/datashaman/larabuild.svg?branch=master)](https://travis-ci.org/datashaman/larabuild)\n\nCI / CD server running on Laravel with a GraphQL API. Built for [LaraHack #3 2019](https://larahack.com).\n\nTable of Contents\n=================\n\n   * [LaraBuild](#larabuild)\n   * [Table of Contents](#table-of-contents)\n      * [Installation](#installation)\n      * [Workflow](#workflow)\n         * [Prepare project repository](#prepare-project-repository)\n         * [Create entities](#create-entities)\n            * [Create a team](#create-a-team)\n            * [Create a project](#create-a-project)\n            * [Build a project](#build-a-project)\n      * [Roles](#roles)\n      * [Schema](https://github.com/datashaman/larabuild/wiki/Schema)\n      * [Screenshots](#screenshots)\n      * [TODO](#todo)\n      * [License](#license)\n\n## Installation\n\nSetup a MySQL database and user for access.\n\nClone repository:\n\n    git clone https://github.com/datashaman/larabuild.git\n\nInstall the composer dependencies:\n\n    composer install\n\nEdit the .env to your requirements.\n\nMigrate the database (optionally seed with demo data):\n\n    php artisan migrate\n\nCreate an admin user:\n\n    php artisan larabuild:user name email password --roles=ADMIN\n\nGet the user's access token:\n\n    php artisan larabuild:access-token [--id=userId] [--email=userEmail]\n\nEither `id` or `email` must be specified.\n\nAssuming you use valet, open the [GraphQL playground](http://larabuild.test/graphql-playground).\n\nEdit the _HTTP HEADERS_ and add an _Authorization_ header:\n\n    {\n        \"Authorization\": \"Bearer token\"\n    }\n\nReplace the word `token` with the output from the access token command above.\n\nIf you use a client other than playground, you might have to add another header:\n\n    {\n        \"X-Requested-With\": \"XMLHttpRequest\"\n    }\n\nCongratulations, you're connected to the GraphQL API!\n\n## Workflow\n\n### Prepare project repository\n\nCreate a private key for the deploy user:\n\n    ssh-keygen\n\nWhen prompted save the file locally in your folder somwewhere. Assuming you called it _larabuild_, it will generate _larabuild_ and _larabuild.pub_.\n\nCreate a new _deploy key_ (under Settings / Deploy Keys on _GitHub_) in the project repository, and paste the contents of _larabuild.pub_ into the form.\n\nAdd, commit and push a file to the project repository named `.larabuild.yml` containing the following content:\n\n    install:\n        - ['echo', 'hello world']\n\nYou must use list format for the command if you are using _docker_ execution. Local execution (the default) commands can be specified as strings.\n\n### Create entities\n\nExample queries are shown as pseudo-JSON. Put the query and variables wherever they should go in your GraphQL client.\n\n#### Create a team\n\nCreate a team to hold our project:\n\n    {\n        \"query\": \"\n            mutation createTeam($team: TeamInput!) {\n                createTeam(team: $team) {\n                    id\n                    name\n                }\n            }\n        \",\n        \"variables\": {\n            \"id\": \"example-team\",\n            \"name\": \"Example Team\"\n        }\n    }\n\nwill respond with:\n\n    {\n        \"data\": {\n            \"createTeam\": {\n                \"id\": \"example-team\",\n                \"name\": \"Example Team\"\n            }\n        }\n    }\n\n#### Create a project\n\nUse the `id` from above in `teamId` and the content of the private key file _larabuild_ for `privateKey` below to create a project:\n\n    {\n        \"query\": \"\n            mutation createProject($project: CreateProjectInput!) {\n                createProject(project: $project) {\n                    id\n                    team {\n                        id\n                        name\n                    }\n                    name\n                    repository\n                }\n            }\n        \",\n        \"variables\": {\n            \"teamId\": teamId,\n            \"id\": \"example-project\",\n            \"name\": \"Example Project\",\n            \"repository\": \"https://github.com/user/repository.git\",\n            \"privateKey\": privateKey\n        }\n    }\n\nThis will return a JSON response including the project `id`:\n\n    {\n        \"data\": {\n            \"createProject\": {\n                \"id\": \"example-project\",\n                \"team\": {\n                    \"id\": \"example-team\",\n                    \"name\": \"Example Team\"\n                },\n                \"name\": \"Example Project\",\n                \"repository\": \"https://github.com/user/repository.git\"\n            }\n        }\n    }\n\n#### Build a project\n\nWe will now generate our first build.  As an admin user, you can build projects in any team. Use the `projectId` from above:\n\n    {\n        \"query\": \"\n            mutation buildProject($id: ID!, $commit: String!) {\n                buildProject(id: $id, commit: $commit) {\n                    id\n                    number\n                    status\n                    output\n                }\n            }\n        \",\n        \"variables\": {\n            \"id\": projectId,\n            \"commit\": \"master\"\n        }\n    }\n\nThe commands in the `install` value from `.larabuild.yml` file in the project repository will run and the build output and status will be shown as a JSON response:\n\n    {\n        \"data\": {\n            \"buildProject\": {\n                \"id\": \"QnVpbGQ6NA==\",\n                \"number\": 1,\n                \"status\": \"success\",\n                \"output\": \"hello world\\n\"\n            }\n        }\n    }\n\nIf any of the commands listed fails during the process, the build has a status of `failed`.\n\nIf no `.larabuild.yml` file is found, the build has a status of `not-found`. While the job is running, the status is `started`.\n\nLook at the [feature tests](tests/Feature) for how to use the rest of the GraphQL API, or consult the introspected documentation in your GraphQL client.\n\n## Roles\n\nRegular users (no role)\n    \n- can belong to many teams\n- cannot administer teams or their projects\n- can view their teams, projects and builds\n- can build projects in their teams\n\nTeam admin users (`TEAM_ADMIN` role)\n\n- can update the team\n- can create, update and delete projects\n- can create and update users\n\nAdmin users (`ADMIN` role)\n\n- can access everything\n- can add and remove roles from users\n\n## Screenshots\n\n![Create Team](screenshots/Screenshot-Create-Team.png)\n\n![Build Project](screenshots/Screenshot-Build-Project.png)\n\n## TODO\n\nAll the current _TODO_ items have been logged as [issues](https://github.com/datashaman/larabuild/issues).\n\n## License\n\n    MIT License\n\n    Copyright (c) 2019 Marlin Forbes\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Flarabuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatashaman%2Flarabuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Flarabuild/lists"}