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

unstahing always success even if stash failed

XMLWordPrintable

      No matter if stash succed or not unstash always pass.

      I want to stash file but I dont know if it exists. If file exists everything goes well my_jar is saved and I can unstash it. But... if file doesnt exists it goes to catch() section and I guess that unstash also should go to catch() section but it's not happening. Instead of it  unstash return success (without any files). It means that during stash section "my_jar" label is created and unstash recognize it as stashed file.

       

      (NODE1){
          try {
              stash includes: 'some_jar.jar', name: 'my_jar'
          }
          catch(e){
             println(e.toString())
          }
      }
      .
      .
      .
      (NODE2){
           try {
              unstash 'my_jar'
           } 
          catch (e) {
              println(e.toString())
              //DO SOMETING
      }

            Unassigned Unassigned
            tomkoz Tomasz Koźlak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: