Plugin Overview

by bradrydzewski

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:

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+ publish:
+   image: plugins/docker
+   repo: foo/bar
+   tags: latest

+ notify:
+   image: plugins/slack
+   channel: dev

Plugin Isolation

Plugins are executed in Docker containers and are therefore isolated from the other steps in your build pipeline. Plugins do share the build workspace, mounted as a volume, and therefore have access to your source tree.

Plugin Volumes

Plugins are executed with write access to your build workspace, the root of your git repository, using Docker volumes. Plugins may therefore interact with your source code repository and build artifacts.

Plugin Execution

Plugins are not executed for pull request. You can override the default behavior by configuring the types of events for which the plugin is executed.

pipeline
  notify:
    image: plugins/slack
    channel: dev
+   when:
+     event: [ push, tag, deployment, pull_request ]

Plugins are also not executed if any of the previous pipeline steps return a non-zero exit code. You can override the default behavior by configuring the status for which the plugin is executed.

pipeline
  notify:
    image: plugins/slack
    channel: dev
+   when:
+     status: [ success, failure ]