Forking Plugins

In the Drone community we highly encourage forking and modifying a plugin to better meet your teams needs. When you fork and modify a plugin, you can publish your fork to your DockerHub account and configure your pipeline to use your published fork. For example:

steps:
  - name: notify
-   image: plugins/slack
+   image: acme/slack
    settings:
      channel: dev
      webhook:
        from_secret: slack_token

Forking Docker Plugins

If you decide to fork and modify a Docker plugin there are extra steps you need to take for the plugin to continue working as expected. Specifically, you need to register your plugin as trusted by passing the name of your plugin image to the runner using the DRONE_RUNNER_PRIVILEGED_IMAGES environment variable:

DRONE_RUNNER_PRIVILEGED_IMAGES=acme/docker

If you do not perform this step you will get the following error:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Contributing Back Changes

Once you publish and test your forked plugin, you may consider sending a pull request back to the original repository. Please note that we have a strict policy against making breaking changes to plugins, and we try to keep our plugins relatively simple and focused on doing one thing well. As a result, we may not accept all patches, and may instead encourage you to publish your fork and share with the broader community.

We view having multiple plugins that serve the same space (e.g. multiple slack plugins) as a good thing, the same way having multiple npm packages that serve the same space is a good thing. This allows teams to iterate and innovate and solve for different use cases, while allowing our core plugins to remain simple, stable and reliable.