Jenkins : Build Flow Extensions Plugin

Plugin Information

No information for the plugin 'build-flow-extensions-plugin' is available. It may have been removed from distribution.

This plugin adds defines some build flow extensions.

Project Configuration

To enable the extension it needs to be registered inside your build flow DSL. The registration key for this plugin is 'build-flow-concurrent-extensions'

"registration"
def ext = extension.'build-flow-concurrent-extensions'

Be Careful

The name of the extension as well as the methods defined below may be subject to change and the api is not yet considered stable.

Extensions

block

The block DSL ensures that only one Run (build) of a particular BuildFlow will execute the steps contained within it concurrently.
It further will only allow the most recent FlowRun to proceed if multiple become blocked.
It is expected that the blockName will only be used once in a Flow - using the blockname multiple times will work, however the results may not be what the user intended).

If the block is not executed then the flow will be aborted.

"block example"
def ext = extension.‘build-flow-concurrent-extensions'

def myparams = new HashMap(params)
// define some parameters

build(myparams, "myproj-tests_LEVEL-1")

ext.block("level2 ") {
  build(myparams , "myproj-tests_LEVEL-2")
}

ext.block(“level3“) {
   parallel (
      { build(myparams, "myproj-tests_LEVEL-3") },
      { build(myparams, "myproj-tests_CUST_FOOBAR") }
   )
}

In the above example all flows will trigger and run myproj-tests_LEVEL-1. If that is successful then only one run at once will run myproj-tests_LEVEL-2. If subsequent runs attempt to start myproj-tests_LEVEL-2 whilst a previous run is still running this job then they will wait until the job has finished, at which point only the most recent run of the flow will run the "myproj-tests_LEVEL-2" job and earlier ones will be aborted.
The example also shows that the block can be used around other flow constructs such as the parallel DSL.

Be Careful

This flow method will only work correctly in the 0.11 (or later) version of buildflow which has not yet been released.

getLastStableRun

This method gets the most recent stable build of a project.

  • parameters:
    • String: name of the project (relative to this flow).
  • return: The last stable build of the named project
  • throws:
    • JobNotFoundException: if the job can not be located, or there is no lastStable build.

FAQ

Help and Support

For Help and support please use the Jenkins Users mailing list.
To report a bug please check the bug tracker to see if the issue has been reported before creating a new issue.

Version History

0.0.1 (Not yet released)

build from source or download from here if interested

The comment list below is not monitored.