Skip to content

Commit a10c6c4

Browse files
Merge pull request #2377 from buildkite/add-plugin-example-diagram
Add new plugin diagram and tidy up page structure
2 parents 30bf7a9 + 3d19afe commit a10c6c4

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed
142 KB
Loading

pages/plugins.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
# Buildkite plugins
22

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:
44

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.
610

11+
The following diagram shows how a plugin might hook into the job lifecycle:
712

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" %>
914

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).
1116

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.
1318

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
1520

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.
1926

2027
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.
2128

29+
See [Using plugins](/docs/plugins/using) for more information about adding plugins to your pipeline definition.
30+
2231
## Finding plugins
2332

2433
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

Comments
 (0)