|
1 | 1 | # Buildkite plugins |
2 | 2 |
|
3 | | -Add plugins to [command steps](/docs/pipelines/command-step) in your YAML pipeline to add functionality to Buildkite. Plugins can do things like execute steps in Docker containers, read values from a credential store, or add test summary annotations to builds. |
| 3 | +Plugins are small self-contained pieces of extra functionality that help you customize Buildkite to your specific workflow. Plugins modify your build [command steps](/docs/pipelines/command-step) at one or more of the ten [job lifecycle hooks](/docs/agent/v3/hooks). Each hook modifies a different part of the job lifecycle, for example: |
4 | 4 |
|
5 | | -<%= image "plugins-overview.png", width: 537, height: 209, alt: "Screenshot of a pipeline step with a plugin, and the plugin from the directory", class: "no-decoration" %> |
| 5 | +- Setting up the environment. |
| 6 | +- Checking out the code. |
| 7 | +- Running commands. |
| 8 | +- Handling artifacts. |
| 9 | +- Cleaning up the environment. |
6 | 10 |
|
| 11 | +The following diagram shows how a plugin might hook into the job lifecycle: |
7 | 12 |
|
8 | | -## What is a plugin? |
| 13 | +<%= image "plugins-job-lifecycle-example.png", alt: "A plugin interacts with the job lifecycle using environment, post-command, and pre-exit hooks", class: "no-decoration" %> |
9 | 14 |
|
10 | | -Plugins are small self-contained pieces of extra functionality that help you customize Buildkite to your specific workflow. Plugins modify your build [command steps](/docs/pipelines/command-step) at one or more of the ten [job lifecycle hooks](/docs/agent/v3/hooks). Each hook changes a different part of how your jobs set up the environment, check out code, run commands, handle artifacts or clean up the environment. |
| 15 | +Plugins can be *open source* and available for anyone to use, or *private* and kept in private repositories that only your organization and agents can access. Plugins can be hosted and referenced using [a number of sources](/docs/plugins/using#plugin-sources). |
11 | 16 |
|
12 | | -Reference plugins in your pipeline configuration, and when the step containing the plugin runs, your agent will override the default behavior with hooks defined in the plugin [hooks](/docs/agent/v3/hooks). In case there is more than one, it will be with the command hook of the first plugin that defines it. |
| 17 | +Plugins can be also be *vendored* (if they are already present in the repository, and included using a relative path) or *non-vendored* (when they are included from elsewhere), which affects the [order](/docs/agent/v3/hooks#job-lifecycle-hooks) they are run in. |
13 | 18 |
|
14 | | -Plugins can be *open source* and available for anyone to use, or *private* and kept in private repositories that only your organization and agents can access. Plugins can be hosted and referenced using [a number of sources](/docs/plugins/using#plugin-sources). |
| 19 | +## How to use plugins |
15 | 20 |
|
16 | | -Plugins can be also be *vendored* (if they are already present in the repository, |
17 | | -and included using a relative path) or *non-vendored* (when they are included |
18 | | -from elsewhere), which affects the [order](/docs/agent/v3/hooks#job-lifecycle-hooks) they are run in. |
| 21 | +Add plugins to [command steps](/docs/pipelines/command-step) in your YAML pipeline to add functionality to Buildkite. Plugins can do things like execute steps in Docker containers, read values from a credential store, or add test summary annotations to builds. |
| 22 | + |
| 23 | +<%= image "plugins-overview.png", width: 537, height: 209, alt: "Screenshot of a pipeline step with a plugin, and the plugin from the directory", class: "no-decoration" %> |
| 24 | + |
| 25 | +Reference plugins in your pipeline configuration, and when the step containing the plugin runs, your agent will override the default behavior with hooks defined in the plugin [hooks](/docs/agent/v3/hooks). In case there is more than one, it will be with the command hook of the first plugin that defines it. |
19 | 26 |
|
20 | 27 | Some plugins allow configuration. This is usually defined in your `pipeline.yml` file and is read by the agent before the plugin hooks are run. See plugins' readme files for detailed configuration and usage instructions. |
21 | 28 |
|
| 29 | +See [Using plugins](/docs/plugins/using) for more information about adding plugins to your pipeline definition. |
| 30 | + |
22 | 31 | ## Finding plugins |
23 | 32 |
|
24 | 33 | In the [Buildkite plugins directory](/docs/plugins/directory) you can find all the plugins maintained by Buildkite, as well as plugins from third-party developers. |
|
0 commit comments