[JIRA] (JENKINS-40167) readYaml requires a workspace even if the workspace is not needed
Title: Message Title Mike Dougherty updated an issue Jenkins / JENKINS-40167 readYaml requires a workspace even if the workspace is not needed Change By: Mike Dougherty `readYaml` appears to require a workspace, even if only the `text` argument is used.Using this pipeline script:{code :groovy }echo readYaml(text: "---"){code}I get this result:{code}Started by user Mike Dougherty[Pipeline] readYamlRequired context class hudson.FilePath is missingPerhaps you forgot to surround the code with a step that provides this, such as: node[Pipeline] End of Pipelineorg.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:253) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:179) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108) at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:103) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16) at WorkflowScript.run(WorkflowScript:1) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82) at sun.reflect.GeneratedMethodAccessor434.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) at sun.reflect.GeneratedMethodAccessor447.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at
[JIRA] (JENKINS-40167) readYaml requires a workspace even if the workspace is not needed
Title: Message Title Mike Dougherty created an issue Jenkins / JENKINS-40167 readYaml requires a workspace even if the workspace is not needed Issue Type: Bug Assignee: rsandell Components: pipeline-utility-steps-plugin Created: 2016/Dec/01 8:55 PM Environment: Jenkins 2.19.1; pipeline-utility-steps 1.2.1 Priority: Minor Reporter: Mike Dougherty `readYaml` appears to require a workspace, even if only the `text` argument is used. Using this pipeline script: Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml echo readYaml(text: "---") I get this result: Started by user Mike Dougherty [Pipeline] readYaml Required context class hudson.FilePath is missing Perhaps you forgot to surround the code with a step that provides this, such as: node [Pipeline] End of Pipeline org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:253) at