-
Bug
-
Resolution: Unresolved
-
Minor
MetadataJobProperty extends AbstractProject, while Pipeline (WorkflowJob) doesn't extend it:
Groovy script inside a Pipeline Job:
stage 'testMetadata' node{ def testJob = currentBuild; properties([[$class :'MetadataJobProperty', values : [[ $class: 'StringMetadataValue', name : 'owner', value : 'bob' ]] ]]); }
Returns the following error:
[Pipeline] stage (testMetadata)
Using the 'stage' step without a block argument is deprecated
Entering stage testMetadata
Proceeding
[Pipeline] node
Running on master in (...)
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: cannot apply com.sonyericsson.hudson.plugins.metadata.model.MetadataJobProperty to a WorkflowJob
Finished: FAILURE