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

Pipeline Job-- deletedir() delete only current directory but @script and @tmp dir still there in workspace.

    Details

    • Similar Issues:

      Description

      Directories with an ampersand (like @tmp and @script) are not removed when using 'deletedir()' in pipeline stage.

        Attachments

          Issue Links

            Activity

            Hide
            jlpinardon jlpinardon added a comment -

            +1 I have added in a post always block a set of folderDelete operation... As far as I have only one slave, it is sustainable, but it will become ugly when using a label referencing several slaves.

            Show
            jlpinardon jlpinardon added a comment - +1 I have added in a post always block a set of folderDelete operation... As far as I have only one slave, it is sustainable, but it will become ugly when using a label referencing several slaves.
            Hide
            karlparry Karl Parry added a comment - - edited

            +1 we now have about 200-300 @tmp/@script folders being created every day across several slave servers.

            -EDIITED-

            Will add the script snippet provided above for current jobs for now

            Show
            karlparry Karl Parry added a comment - - edited +1 we now have about 200-300 @tmp/@script folders being created every day across several slave servers. - EDIITED - Will add the  script snippet provided above for current jobs for now
            Hide
            andreimuresianu Andrei Muresianu added a comment -

            +1 still a problem. The tmp directories do not add much value.

            Show
            andreimuresianu Andrei Muresianu added a comment - +1 still a problem. The tmp directories do not add much value.
            Hide
            idanadar Idan Adar added a comment -

            +1

            Our agents remain unclean because of this.

            Show
            idanadar Idan Adar added a comment - +1 Our agents remain unclean because of this.
            Hide
            openjenkins J S added a comment - - edited

            Hello Guys,

            i have the following Jenkinsfile :

             

            pipeline {
                options { disableConcurrentBuilds() }
                agent { label 'vhost01' }    
            stages {
            [..AllStages..]
                }    post {
                    always {
                        cleanWs()
                    }
                }
            }
            

            I use multibranch pipeline and have the problem that the folder under my node "vhost01" are not deleted. Can anyone help ?

             

             

            Show
            openjenkins J S added a comment - - edited Hello Guys, i have the following Jenkinsfile :   pipeline { options { disableConcurrentBuilds() } agent { label 'vhost01' } stages { [..AllStages..] } post { always { cleanWs() } } } I use multibranch pipeline and have the problem that the folder under my node "vhost01" are not deleted. Can anyone help ?    

              People

              • Assignee:
                Unassigned
                Reporter:
                hiten_prajapati Hiten Prajapati
              • Votes:
                59 Vote for this issue
                Watchers:
                75 Start watching this issue

                Dates

                • Created:
                  Updated: