I have a pipeline job that consists of several stages, each of which takes several hours. Before pipelining, each stage was its own job, and I was using the Heavy Job Plugin for some of them. Now it looks as though the "properties" command allows to specify the "HeavyJobProperty". I managed to get its syntax correctly thanks to this question.
My pipeline script looks likes this:
node ('<label>') {
ws ('<mydir>') {
// Mark the code checkout 'stage'....
stage 'Checkout'
git url: '<repourl>'
stage 'Build'
properties ([[$class: 'HeavyJobProperty', weight: 8]])
sh '<mybuild>'
}
}
Unfortunately, this doesn't seem to work, when executing the script, I get the message:
ERROR: cannot apply hudson.plugins.heavy_job.HeavyJobProperty to a WorkflowJob
Does anyone have an idea how I get this to work?
It looks as though the plugin simply hasn't been adapted to pipelining jobs yet, even though the pipelining docs shows the HeavyJobProperty.