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

Delete existing stash in a pipeline

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.113

      After creating a stash, and using it, would need to be able to delete it before the end of the pipeline to free some resources, typically before waiting for user input:

      // code placeholder
      node {
        git checkout
        stash name: "source"
        
        parallel (
         task1: {
           node {
             unstash name: "sources"
             sh "make DEBUG=1"
           }
         },
      
         task2: {
           node {
             unstash name: "sources"
             sh "make DEBUG=0"
           }
         })
      
         deleteStash name: "sources"  // New feature: free disk space before the end of pipeline
         
         input message: "Go ?"
      }
      

            Unassigned Unassigned
            jguigui Jean-Paul G
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: