readTrusted Pipeline from SCM only works in */master

XMLWordPrintable

      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.

      #!groovy
      node {
       stage('test') {
        def trustedText = readTrusted 'foo.properties'
        echo trustedText
       }
      }
      

      Ā 

      Error message from Jenkins is:

      ERROR: ā€˜readTrusted’ is only available when using ā€œMultibranch Pipelineā€ or ā€œPipeline script from SCMā€

            Assignee:
            Jesse Glick
            Reporter:
            Marc Benstein
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: