Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42817

readTrusted Pipeline from SCM only works in */master

      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”

          [JENKINS-42817] readTrusted Pipeline from SCM only works in */master

          Marc Benstein created issue -
          Marc Benstein made changes -
          Description Original: 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.
          {code:java}
          #!groovy
          node {
           stage('test') {
            def trustedText = readTrusted 'foo.properties'
            echo trustedText
           }
          }
          {code}
           
          New: 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.
          {code:java}
          #!groovy
          node {
           stage('test') {
            def trustedText = readTrusted 'foo.properties'
            echo trustedText
           }
          }
          {code}
           

          Error message from Jenkins is:

          ERROR: ‘readTrusted’ is only available when using “Multibranch Pipeline” or “Pipeline script from SCM”
          Marc Benstein made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Marc Benstein made changes -
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: pipeline-multibranch-defaults-plugin [ 21926 ]
          Marc Benstein made changes -
          Assignee Original: Denis Saponenko [ vaimr ] New: Andrew Bayer [ abayer ]
          Marc Benstein made changes -
          Assignee Original: Andrew Bayer [ abayer ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-31386 [ JENKINS-31386 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-33273 [ JENKINS-33273 ]
          Jesse Glick made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Component/s New: git-plugin [ 15543 ]

            jglick Jesse Glick
            initialzero Marc Benstein
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: