Updated 2 years ago by Admin

Plugins are Docker containers that perform pre-defined tasks and are configured as steps in your pipeline. Plugins can be used to deploy code, publish artifacts, send notification, and more.

Example pipeline using the Docker and Slack plugins:

1  kind: pipeline  
2 type: docker
3 name: default
5 steps:
6 - name: build
7 image: golang
8 commands:
9 - go get
10 - go test
11 - go build
13 - name: publish
14 image: plugins/docker
15 settings:
16 username: kevinbacon
17 password: pa55word
18 repo: foo/bar
19 tags:
20 - 1.0.0
21 - 1.0
23 - name: notify
24 image: plugins/slack
25 settings:
26 channel: developers
27 username: drone

Plugins are just Docker containers which means you can write plugins in any programming language that runs inside a container. You can even create plugins using simple bash scripting.

Plugin Inputs

Plugins parameters are defined in the settings section of the pipeline step and are passed to the plugin container as environment variables. The environment variables are prefixed to prevent naming conflicts.

  • Example plugin configuration.
    - name: publish
    image: plugins/docker
    username: kevinbacon
    password: pa55word
    repo: foo/bar
    - 1.0.0
    - 1.0
  • Example plugin variables passed to the container.

Plugin parameters can be any primitive type or array of primitive types. Arrays are converted to comma-separate strings.

Plugin Distribution

Plugins are distributed as Docker images. You can publish plugins to any Docker registry, private or public, to share plugins internally with your organization, or publicly with the broader developer community.

Plugin Registry

The Drone plugin registry is a listing of Open Source plugins created by the Drone community. Want to add your plugin to the registry? Send us a pull request that adds your plugin to the registry website.

Further Reading

How did we do?