View Flexible Publish on the plugin site for more information.
- Use a publisher more than once within a build
- Select the execution order of the publishers
- Use Run Conditions to decide whether to publish
- Use Builders as actions by installing the Any Build Step Plugin (which will also install the Conditional BuildStep Plugin)
Always use Always
If you always add your Post-build Actions to Flexible publish, then not only will you be able to change the execution order afterwards, but you will have the ability to temporarily disable a publisher without losing the publishers' configuration.
You can just switch between the Always and the Never run conditions.
|There are no images attached to this page.|
This plugin can be installed from the Update Center (Manage Jenkins > Manage Plugins) under "Other Post-Build Actions".
To install manually, download the latest plugin from http://mirrors.jenkins-ci.org/plugins/flexible-publish/ and use the Upload Plugin option in the Advanced tab of the Plugin Manager.
If you do install manually, you will need to also install the Run Condition Plugin from http://mirrors.jenkins-ci.org/plugins/run-condition/ and the Token Macro Plugin from http://mirrors.jenkins-ci.org/plugins/token-macro/.
Import existing publishers
In Manage Jenkins/ Script console, copy the following to see which publishers can be moved (for a job named 'My Job')
Or, if you like doing it the hard way ...
You should see a list something like this
You can move a publisher into Flexible publish
After moving one or more publishers, go to the configure page, check everything looks ok, then save the configuration.
If you like to live on the edge, and would like to move all of the publishers in one go, then ...
Grain of salt
Almost every publisher I have tried works without issue.
The three exceptions are
Record fingerprints of files to track usage/Fingerprint all archived artifacts. If you Archive the artifacts from within the Flexible publisher, then the files you want to fingerprint will need to be listed explicitly as the fingerprinter will not find the archiver where it is expecting it!
- Some publishers may not be prepared to run more than once during a build
- Some publishers may expect to always run before or always run after another publisher
- Not all publishers are available for inclusion in the Flexible publish action. Dev note:- Specifically, the publisher must use a DataBoundConstructor to be available.
- Some publishers state that they should only run after the build has been finalized - when the build status is known, and cannot be modified. The Flexible publish action does not enforce this restriction.
Used with multi-configuration projects
When you use Flexible Publish Plugin with multi-configuration projects (aka. matrix projects), you should know followings:
Generally, publishers run in two phase for multi-configuration projects.
- Run for each combination of axes. It works just like in Free Style Projects.
- Run for whole the multi-configuration project. This is what is called aggregation.
For example, "Publish JUnit test result report" works:
- see test results in each combination of axes
- sum up the results of all of the combinations.
You can specify conditions both for each combination and the aggregation.
If you want to separate condition for them, check "Condition for Matrix Aggregation" (This appears only in multi-configuration projects).
This is especially useful for the case you want control the execution of the publisher depends on combination of axes.
Be careful to specify the condition, for inconsistent execution causes the build fails.
- Fixed JENKINS-13795 NPE when configuring Flexible publish in a new job
- Exclude "Trigger parametrized build on other projects" JENKINS-12418
- Mark the build as a failure if an action would have stopped the build
- Add some utility methods to allow publishers to be moved into Flexible publish from the script console
- Don't allow "Build other projects" in the Flexible publish - it does not work here
- Do not allow the actions to prevent other publishers from running (unless they throw an exception)
- Changed the EP interface
- Add extension to enable the list of publishers to be modified
- Updated a help file
- Enable the user to choose what will happen if the evaluation of a condition fails
- Initial release