# Buildkite Plugin Sources and Monorepo

**URL:** https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361
**Category:** Features Requests
**Created:** [November 9, 2022, 6:33pm UTC](https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361 "2022-11-09T18:33:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pragmakyle](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pragmakyle](https://forum.buildkite.community/u/pragmakyle)
#### Post date: [November 9, 2022, 6:33pm UTC](https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361/1 "2022-11-09T18:33:02Z")

</div>

We use a custom buildkite plugin for a lot of projects. We currently use ssh for downloading the plugin.

We have a desire to use a monorepo pattern, including the code required for our buildkite plugin. Would it be possible to use a git repo’s subdirectory as a plugin source?

Being able to do something like this would be ideal:

```auto
steps:
  - label: ":pipeline:"
    plugins:
      - ssh://git@github.com/org/code.git//infra/buildkite-plugin: ~

```

---

<div class="post-metadata">

### Author: ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)
#### Post date: [November 9, 2022, 8:03pm UTC](https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361/2 "2022-11-09T20:03:34Z")

</div>

Hey @pragmakyle!

Welcome to the community! 🤗

Yes, it’s possible; it’s what we call “vendored” plugin. You can find more info here [Buildkite Agent Hooks v3 | Buildkite Documentation](https://buildkite.com/docs/agent/v3/hooks#job-lifecycle-hooks) (and see which hooks are not available for vendored plugins). To use it, it should be something like:

```auto
steps:
  - label: ":pipeline:"
    plugins:
      - ./infra/buildkite-plugin: ~

```

Best!

---

<div class="post-metadata">

### Author: ![pragmakyle](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pragmakyle](https://forum.buildkite.community/u/pragmakyle)
#### Post date: [November 10, 2022, 11:05pm UTC](https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361/3 "2022-11-10T23:05:18Z")

</div>

Thanks for the reply.

We actually have all of our infra in a separate mono-repo from our infrastructure code, and we would like to keep the buildkite plugin in that repo. Would it be possible to use an repo external to the application, but still use a subdirectory of that repo?

---

<div class="post-metadata">

### Author: ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)
#### Post date: [November 12, 2022, 12:01am UTC](https://forum.buildkite.community/t/buildkite-plugin-sources-and-monorepo/2361/4 "2022-11-12T00:01:43Z")

</div>

Oh! thanks for the extra info!  
Unfortunately, that it’s not possible. What I can think of that you can try, but I’m not completely sure that it may work, is using git-submodule and treating that plugin as a vendored plugin. But again, not sure that it will work…

Best!
