Using Plugins
Learn how to configure and use plugins effectively in your Crow CI pipelines.
Basic Usage
Section titled “Basic Usage”Plugins are defined as steps with an image and settings:
Settings
Section titled “Settings”The settings key is the primary way to configure plugins. Each setting is converted to an environment variable with a PLUGIN_ prefix.
Simple Settings
Section titled “Simple Settings”Boolean, numeric, and string values become strings:
Naming Conventions
Section titled “Naming Conventions”Setting names are transformed to uppercase with underscores:
| Setting | Environment Variable |
|---|---|
some-setting | PLUGIN_SOME_SETTING |
someValue | PLUGIN_SOMEVALUE |
nested_value | PLUGIN_NESTED_VALUE |
Complex Settings
Section titled “Complex Settings”How a setting is encoded depends on its type:
| Setting type | Encoding |
|---|---|
| Object (map) | JSON |
| Array containing objects or nested arrays | JSON |
| Array of plain values (strings, numbers, booleans) | Comma-separated |
Results in:
PLUGIN_TARGETS='production,staging'PLUGIN_COMPLEX='{"abc":2,"list":["item1","item2"]}'
targets is a top-level array of plain values, so it is comma-separated rather than JSON.
The nested list sits inside an object, so it is encoded as part of that object’s JSON.
Lists Containing Commas
Section titled “Lists Containing Commas”To pass values that contain commas, nest the array inside an object to have it encoded as JSON instead:
Results in PLUGIN_FILES='{"paths":["file,with,commas.txt","CHANGELOG.md"]}'.
The plugin must be written to accept this object form.
Secrets in Plugins
Section titled “Secrets in Plugins”Use from_secret to inject sensitive values:
Secret Filtering
Section titled “Secret Filtering”For enhanced security, restrict secrets to specific plugins:
See Secrets documentation for more details.
Privileged Plugins
Section titled “Privileged Plugins”Some plugins (like Docker builders) require privileged mode. This must be enabled by the server administrator.
Server Configuration
Section titled “Server Configuration”Administrators configure allowed privileged plugins:
Match types include:
- semver (default) - Match by major/minor version
- semver-range - Use semver constraint syntax
- exact - Match exact image tag
- regex - Match by regular expression
Conditional Plugin Execution
Section titled “Conditional Plugin Execution”Use when conditions to control when plugins run:
Plugin Dependencies
Section titled “Plugin Dependencies”Control execution order with depends_on:
Troubleshooting
Section titled “Troubleshooting”Plugin Not Working
Section titled “Plugin Not Working”- Check image availability - Ensure the plugin image exists and is accessible
- Verify settings - Review plugin documentation for required settings
- Check logs - Plugin output appears in step logs
- Secrets - Ensure secrets are properly configured and accessible
Environment Variables Not Passed
Section titled “Environment Variables Not Passed”Remember that environment: is not allowed for plugins in Crow. All configuration must use settings:.