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

readTrusted Pipeline from SCM only works in */master

    XMLWordPrintable

Details

    Description

      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”

      Attachments

        Issue Links

          Activity

            initialzero Marc Benstein created issue -
            initialzero Marc Benstein made changes -
            Field Original Value New Value
            Description 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}
             
            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”
            initialzero Marc Benstein made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            initialzero Marc Benstein made changes -
            Component/s workflow-multibranch-plugin [ 21465 ]
            Component/s pipeline-multibranch-defaults-plugin [ 21926 ]
            initialzero Marc Benstein made changes -
            Assignee Denis Saponenko [ vaimr ] Andrew Bayer [ abayer ]
            initialzero Marc Benstein made changes -
            Assignee Andrew Bayer [ abayer ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-31386 [ JENKINS-31386 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-33273 [ JENKINS-33273 ]
            jglick Jesse Glick made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Component/s git-plugin [ 15543 ]
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-multibranch PR 67 (Web Link)" [ 17395 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "git PR 519 (Web Link)" [ 17396 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            initialzero Marc Benstein made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: