{"id":19742017,"url":"https://github.com/ksindi/buildkite-monorepo-example","last_synced_at":"2025-02-27T23:19:47.081Z","repository":{"id":41319811,"uuid":"133663303","full_name":"ksindi/buildkite-monorepo-example","owner":"ksindi","description":":ship: Example monorepo using Buildkite and buildpipe plugin","archived":false,"fork":false,"pushed_at":"2024-04-16T23:43:42.000Z","size":462,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-18T12:15:22.148Z","etag":null,"topics":["buildkite","cicd","devops","devops-tools","example","monorepo"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/ksindi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-16T12:36:15.000Z","updated_at":"2024-02-16T11:06:07.000Z","dependencies_parsed_at":"2024-11-12T01:31:10.278Z","dependency_job_id":"f856344d-2ab8-4d59-aba5-ba6b9234d2d2","html_url":"https://github.com/ksindi/buildkite-monorepo-example","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fbuildkite-monorepo-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fbuildkite-monorepo-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fbuildkite-monorepo-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fbuildkite-monorepo-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksindi","download_url":"https://codeload.github.com/ksindi/buildkite-monorepo-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241072449,"owners_count":19904770,"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":["buildkite","cicd","devops","devops-tools","example","monorepo"],"created_at":"2024-11-12T01:28:47.452Z","updated_at":"2025-02-27T23:19:47.061Z","avatar_url":"https://github.com/ksindi.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Buildkite Monorepo Example\n\nExample monorepo using buildkite plugin [buildpipe](https://github.com/jwplayer/buildpipe-buildkite-plugin/).\n\nThe monorepo config lives in [.buildkite/pipeline.yml](./.buildkite/pipeline.yml).\nYou can see there are 3 projects defined.\n\nThe config shows steps the projects share with their associated commands. The commands are standardized using `make` and Makefile inheritance.\n\n## Getting started\n\n1. Create the initial pipeline:\n    ```yaml\n    steps:\n      - label: \":buildkite:\"\n        plugins:\n          - jwplayer/buildpipe#v0.9.1:\n              dynamic_pipeline: .buildkite/dynamic_pipeline.yml\n    ```\n1. Generate deploy key and change permissions\n    ```bash\n    # Start ssh agent in the background\n    eval \"$(ssh-agent -s)\"\n\n    # Generate ssh key\n    make generate-deploy-ssh-key\n    chmod 600 ~/.ssh/id_rsa_buildkite_git\n\n    # Create agent socket\n    ssh-agent -a ~/.ssh/ssh-agent.sock\n\n    # Add ssh key\n    ssh-add ~/.ssh/id_rsa_buildkite_git\n\n    # Test key works\n    # https://developer.github.com/v3/guides/using-ssh-agent-forwarding/\n    ssh -T git@github.com\n    ```\n1. Add the public key `~/.ssh/id_rsa_buildkite_git.pub` to your Github repo under Settings \u003e Deploy keys.\n    ![Add deploy key](images/1-add-deploy-key.png)\n1. Run the buildkite agents locally:\n    ```bash\n    # Make sure to add to .bashrc\n    export SSH_AUTH_SOCK=$HOME/.ssh/ssh-agent.sock\n    export BUILDKITE_AGENT_TOKEN=\u003ctoken\u003e\n\n    # Run agent in a docker container scaled to the number of cpus\n    cd buildkite-agent/ \u0026\u0026 make local\n    ```\nYou should see the number of agents at the top bar in Buildkite appear.\n\n## Examples\n\nThe following examples shows how the pipeline creation is dynamic depending on which projects\nwere changed.\n\n1. Updating primer project in master only triggers the primer pipeline to run\n    ![Update single project](images/2-update-primer.png)\n1. Updating both primer and hubot projects in master triggers both pipelines\n    ![Update multiple projects](images/3-update-primer-and-hubot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksindi%2Fbuildkite-monorepo-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksindi%2Fbuildkite-monorepo-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksindi%2Fbuildkite-monorepo-example/lists"}