Drone only allows for a single YAML_ENDPOINT to be defined, which means you can only use one config plugin. This plugin aims to solve that issue by forming a "pipeline" of plugins, with the YAML generated from one plugin, passed on to the next one in series, so that each plugin can be responsible for its own functionality.
This plugin works by:
yaml property to the data)PLUGIN_ENDPOINTS in series, replacing the yaml property with the YAML returned from each endpoint, before sending it on to the next one.Due to the way this plugin works, not all config-plugins will be compatible out of the box (they must support the yaml input value). Please see below for a list of known compatible plugins.
PLEASE NOTE: At the moment it supports only github.com installations.
Generate a GitHub access token with repo permission. This token is used to fetch the .drone.yml file.
Generate a shared secret key. This key is used to secure communication between the server and agents. The secret should be 32 bytes.
$ openssl rand -hex 16
558f3eacbfd5928157cbfe34823ab921
NOTE: This key must be the same for ALL plugins in your pipeline. Authorisation is passed straight through from this plugin to each plugin in the pipeline.
Run the container somewhere where the drone server can reach it (note: the order of endpoints matters):
docker run \
-p ${PLUGIN_PORT}:3000 \
-e PLUGIN_SECRET=558f3eacbfd5928157cbfe34823ab921 \
-e PLUGIN_ENDPOINTS="https://abc.com:3000,https://def.com:3000" \
-e GITHUB_TOKEN=GITHUB8168c98304b \
--name drone-plugin-pipeline \
-detach=true \
microadam/drone-config-plugin-pipeline
Update your drone server with information about the plugin:
-e DRONE_YAML_ENDPOINT=http://${PLUGIN_HOST}:${PLUGIN_PORT}
-e DRONE_YAML_SECRET=558f3eacbfd5928157cbfe34823ab921
See the official docs for extra information on installing a Configuration Provider Plugin.
Below are a list of config plugins that are known to be compatible with this plugin. If you know of any that are missing, please open a PR.
Content type
Image
Digest
Size
28.7 MB
Last updated
over 6 years ago
docker pull stepri/drone-config-plugin-pipeline