Version 1.0.0
Language EN

Plugin Overview

Plugins are special Docker containers used to drop preconfigured tasks into a Pipeline. This makes it easier to accomplish common tasks by calling the plugin with a few parameters rather than scripting the entire process manually. In this sense, Drone plugins are somewhat similar to Unix utility commands that are designed to do one narrowly-focused task well.

For example, we can use scripting in our pipeline to trigger a Slack notification using the curl command:

kind: pipeline
name: default

steps:
- name: message
  image: ubuntu
  commands:
  - curl -X POST --data '{"text":"hello","channel":"#general"}' https://hooks.slack.com/services/...

The above command could be encapsulated and distributed as a plugin.

kind: pipeline
name: default

steps:
- name: webhook
  image: plugins/slack
  settings:
    webhook: https://hooks.slack.com/services/...
    channel: general

In both examples the curl command is being executed, however, the plugin hides these implementation details from the end-user. Furthermore, the plugin uses parameters (webhook, channel, etc) to customize the underlying commands, making it easy to share and re-use this task.

Distribution

Plugins are distributed as Docker images. Drone (or more specifically Docker) is able to automatically download a plugin from any valid Docker registry. This means you can publish your plugins to Dockerhub, or to your organization’s private registry.

Discovery

The best way to find plugins is to search our plugin marketplace. Here you can find plugins for many common tasks such as sending slack notification, building and publishing docker images, and more.

Installation

Plugins are distributed as Docker images and are automatically downloaded at runtime by the Docker daemon. There is no manual installation or setup required.

Upgrading

When a plugin is downloaded it is stored in the local Docker cache. This means plugins will not automatically update. If you want your plugin to automatically update you need to instruct Docker to always check for and pull the latest version:

kind: pipeline
name: default

steps:
- name: webhook
  image: plugins/slack
  pull: always
  settings:
    webhook: https://hooks.slack.com/services/...
    channel: general

Versioning

We recommend specifying the version of the plugin in your configuration. If a version number is not configured, Docker pull the latest plugin image from the registry. This could be problematic if a new version of a plugin is published with breaking changes.

kind: pipeline
name: default

steps:
- name: webhook
  image: plugins/slack:1
  pull: always
  settings:
    webhook: https://hooks.slack.com/services/...
    channel: general

On This Page:

Getting Help

Mailing List
Search for information in the mailing list archives, or post a question.
Chat Support
Real-time chat support from maintainers and community members.