-
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
[JENKINS-40783] Cannot apply Metadata to Pipeline jobs (WorkflowJob)
Epic Link | New: JENKINS-35390 [ 171183 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: Open [ 1 ] |
Component/s | Original: pipeline-model-definition-plugin [ 21706 ] |
Component/s | Original: pipeline [ 21692 ] |