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:
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.
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 settings: username: kevinbacon password: pa55word repo: foo/bar tags: - 1.0.0 - 1.0
Example plugin variables passed to the container.
PLUGIN_USERNAME=kevinbacon PLUGIN_PASSWORD=pa55word PLUGIN_REPO=foo/bar PLUGIN_TAGS=1.0.0,1.0
Plugin parameters can be any primitive type or array of primitive types. Arrays are converted to comma-separate strings.