unstahing always success even if stash failed

This issue is archived. You can view it, but you can't modify it. Learn more

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
      }

            Assignee:
            Unassigned
            Reporter:
            Tomasz Koźlak
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: