Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Rundeck Plugin Examples

This directory contains example plugins generated by the Rundeck Plugin Bootstrap tool. These examples demonstrate the structure and code for each type of plugin that can be created.

Purpose

These examples serve multiple purposes:

  1. Documentation Reference - Provide concrete examples that match the documentation
  2. Quick Start Templates - Show developers exactly what the bootstrap tool generates
  3. Testing - Verify that generated plugins build and work correctly
  4. Consistency - Ensure documentation and generated code stay in sync

Plugin Types

Java Plugins (java-plugins/)

Java plugins provide the most flexibility and access to Rundeck's full API:

  • example-notification - Notification plugin for sending alerts when jobs complete
  • example-workflow-step - Workflow step plugin for custom job steps
  • example-workflow-node-step - Node step plugin for operations on individual nodes
  • example-resource-model-source - Resource model source for dynamic node inventory
  • example-log-filter - Log filter plugin for processing job output
  • example-node-executor - Node executor for custom command execution
  • example-orchestrator - Orchestrator plugin for controlling workflow execution order
  • example-option - Option plugin for dynamic option values

Script Plugins (script-plugins/)

Script plugins are simpler and can be written in any scripting language:

  • example-script-node-executor - Script-based node executor
  • example-script-workflow-step - Script-based workflow step
  • example-script-resource-model - Script-based resource model source
  • example-script-file-copier - Script-based file copier
  • example-script-option - Script-based option provider

UI Plugins (ui-plugins/)

UI plugins extend the Rundeck web interface:

  • example-ui-plugin - Basic UI plugin with JavaScript and CSS

Building Examples

Each example plugin is a complete, buildable Rundeck plugin.

Java Plugins

cd java-plugins/example-notification
gradle build
# Plugin jar will be in build/libs/

Script Plugins

cd script-plugins/example-script-node-executor
gradle build
# Or use make
make
# Plugin zip will be created

UI Plugins

cd ui-plugins/example-ui-plugin
make
# Plugin zip will be created

Installing Examples in Rundeck

  1. Build the plugin (see above)
  2. Copy the resulting .jar or .zip file to Rundeck's libext/ directory
  3. Restart Rundeck (or it may hot-load depending on configuration)
  4. The plugin will appear in the appropriate configuration section

Regenerating Examples

To regenerate all examples (useful after updating the bootstrap tool):

cd /path/to/plugin-bootstrap
./generate-examples.sh

This will:

  1. Clean the existing examples directory
  2. Build the latest bootstrap tool
  3. Generate fresh examples for all plugin types

Using as Templates

While these examples can be used as-is, they're designed to be starting points:

  1. Copy an example that matches your plugin type
  2. Rename it to match your plugin's purpose
  3. Modify the plugin code to implement your functionality
  4. Update the README, build configuration, and tests
  5. Build and install in Rundeck

Structure

Each generated plugin includes:

  • Source code - Plugin implementation (Java/Groovy or scripts)
  • Tests - Spock tests (Java plugins) demonstrating how to test the plugin
  • Build configuration - Gradle build files with proper dependencies
  • README - Basic documentation about the plugin
  • Resources - Icons and other plugin resources

Version Information

These examples were generated with:

  • Rundeck Plugin Bootstrap version: 1.2
  • Rundeck version: 5.7.0-20250101
  • Groovy version: 3.0.21

For the latest version and updates, see: https://github.com/rundeck/plugin-bootstrap