• Declarative backlog

      I tried the pipeline script below, I get 
           WorkflowScript: 4: "preserveStashes" should have 0 arguments but has 1 arguments instead. @ line 4, column 9.
       

      w/o parameter restart with unstash works (by the way, multiple unstashes in one pipe is working too, as expected!)

       
      http://kie-jenkinslts.ppe.kie.de.heidelberg.com:8080/blue/organizations/jenkins/StashUnstash/detail/StashUnstash/9/pipeline#log-12 preserveStashes(5)
      pipeline

      {     agent \{label 'master'}

          options

      {         preserveStashes(5)     }

          stages{
              stage('create stash'){
                  steps

      {                  //create file                  writeFile file: './myFile.txt', text: 'fun stuff'                  stash includes: '*.txt', name: 'funstufftxt'               }

               }
               stage('unstash first'){
               steps{
                   dir('first') {
                       unstash 'funstufftxt'
                       script

      {                        def funtxt = readFile 'myFile.txt'                        println funtxt                  }

                   }
               }
         }
         stage('unstash second'){

               steps{
                   dir('second') {
                        unstash 'funstufftxt'
                        script

      {                       def funtxt = readFile 'myFile.txt'                       println funtxt                   }

                   }
               }
           }
         }
      }

       

          [JENKINS-54386] preserveStashes does not work with parameter

          Jan Hoppe created issue -
          Andrew Bayer made changes -
          Labels New: stage-restart-improvements
          Andrew Bayer made changes -
          Sprint New: Declarative backlog [ 621 ]
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR 1960 (Web Link)" [ 22093 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            hoppej Jan Hoppe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: