Evaluates a custom Groovy script that can use the full Jenkins API (including installed plugins) to consider whether a build qualifies. The evaluation is done through the Script Security plugin.
The script evaluation is not self-triggered and requires to enable a suitable criteria (such as 'Promote immediately once...') in addition to this one.
Available variables are:
promotionProcess
The promotion process containing the condition (hudson.plugins.promoted_builds.PromotionProcess)
build
The build being considered for promotion
(hudson.model.AbstractBuild)
jenkins
The
jenkins.model.Jenkins
instance
To signal the qualification of the build, return true
or a non-empty java.util.Map<String,String>
to contribute to the Promotion
environment
Any script evaluation errors are redirected to the
hudson.plugins.promoted_builds.conditions.GroovyCondition
logger