-
Type:
Bug
-
Resolution: Not A Defect
-
Priority:
Major
-
Component/s: workflow-scm-step-plugin
-
None
Whenever accessing scm property from the Scripted Pipeline the below error is being thrown:
Â
ERROR: âcheckout scmâ is only available when using âMultibranch Pipelineâ or âPipeline script from SCM
Example code:
Â
node {
def tempSCM = scm
}
Please note that the checkout command was not used. Also, when assigning anything to that property no error is thrown:
scm =
[$class : 'GitSCM', branches: [[name: "*/$testsBranchName"]],
//...
credentialsId : 'GitUser'
] //<- no error here
Attached system info
Â
Â