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

find/findall does not work in the pipeline sharedlibrary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline
    • Jenkins ver. 2.7.4

      a very simple groovy method calling find/findall() in deliveryLib
      public def lookAtMe()
      {
      def list = [5, 10, 15, 20, 25, 30]
      def result = list.findAll

      {it -> it > 10 }

      }

      in the pipeline job, execute this method
      @Library('deliveryLib')
      @NonCPS
      import company.misc.findLoop
      stage('find') {
      node('build')

      { def obj = new findLoop(this) obj.lookAtMe() }

      }

      result: return false

      Found a similar issue #26300, but marked as "resolved"
      Anyone still have the same problem in jenkins 2.0 or it is only me?

            Unassigned Unassigned
            zdtsw_1 Wen Zhou
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: