This plugin integrates Drools with Hudson. It lets you define your own build, test and release workflows in a graphical designer, and execute them inside Hudson. The graphical representation allows non-developers to reason about and help design processes. It also gives a much better view of the state of a process at runtime. At a glance anyone can get an idea of wat is happening with a build.
Workflows can create tasks for human users too, e.g. manual testing or signing off on releases. This is also a way to input data during the workflow.
This assumes some familiarity with Hudson, Eclipse and Maven.
First, install the following
Next, we'll create a Maven/Eclipse project to develop the workflows in.
And then our first workflow...
To deploy it:
Then try it:
The Drools plugin defines some custom work items you can use in your workflows.
This is a custom work item for Hudson that starts a build and waits for completion.
This work item represents a script, witten in Groovy that runs inside the Hudsn JVM and has access to all Hudson internals.
Scripts have access to the following parameters:
In the script properties, only a 'Name' is specied. The actual scripts can be configured in the global Drools Management page, or on the project page (TODO).
If the script returns a Map, that is passed as a result to the workflow. Any other object will be wrapped in a Map with key 'result'.
When scripts fail (throw an exception), the workflow does not advance, and the user can manually restart them.If you don't want this, then don't throw an exception.
A human task is a way to get user input during the workflow. Using a Groovy DSL you can define some parameters the user should enter.
The DSL code goes into the 'Content' property of the work item.
On every build completion in Hudson, an event is created, called 'BuildComplete:projectName', which you can subscribe to in a workflow. However you should realize that this event may be triggered multiple times, and every event will be received by every running process instance. Consider starting this build from the workflow itself.
Skip to end of metadata Go to start of metadata