Using a branch with Pipeline from SCM breaks readTrusted. The following snippet only works from */master and not */bugfix/break-readTrusted. See https://github.com/initialzero/jenkins-break-readtrusted.git with branch and pipeline from scm.
Error message from Jenkins is:
ERROR: ‘readTrusted’ is only available when using “Multibranch Pipeline” or “Pipeline script from SCM”