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

Workspace Cleanup does not delete @libs directories created by libraries

    • 2.454

      In Jenkins Pipelines one can use shared libraries. With them a additional directory is created:

      Usual-Workspace: /var/lib/jenkins/workspace/job-id/
      Additional SharedLibrary-Folder: /var/lib/jenkins/workspace/job-id@tmp

      Seems as if there the shared library sources are stored in case one want s to rerun the build.

      In order to completely wipe out old build data, a option to delete this @tmp folder could be introduced.

          [JENKINS-65829] Workspace Cleanup does not delete @libs directories created by libraries

          Bowei created issue -

          same issue here, i have just cleanup 30Go of remaining @libs directories ...

          Cyril Pottiers added a comment - same issue here, i have just cleanup 30Go of remaining @libs directories ...

          Same here. Are there any workarounds or other plugins to use here instead? 

          Vitaliy Schreibmann added a comment - Same here. Are there any workarounds or other plugins to use here instead? 

          Similar issue is still observed that's creating unnecessary space issue.

          But a couple of differences in my observation:

          • Shared Library is being cloned to a folder with @lib suffix, NOT @tmp suffix... e.g. /var/lib/jenkins/workspace/job-id@libs
          • Even though the Jenkins controller (master) is never used for running a Build, these folders are getting created on Jenkins Controller's job workspace.

          Is someone taking a look at this issue?

          Arnab Banerjee added a comment - Similar issue is still observed that's creating unnecessary space issue. But a couple of differences in my observation: Shared Library is being cloned to a folder with @lib suffix, NOT @tmp suffix... e.g. /var/lib/jenkins/workspace/job-id@libs Even though the Jenkins controller (master) is never used for running a Build, these folders are getting created on Jenkins Controller's job workspace. Is someone taking a look at this issue?
          Arnab Banerjee made changes -
          Component/s New: pipeline-groovy-lib-plugin [ 28923 ]

          Jesse Glick added a comment -

          JENKINS-70869 allows you to never create the …@libs directory to begin with.

          Jesse Glick added a comment - JENKINS-70869 allows you to never create the …@libs directory to begin with.
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-70869 [ JENKINS-70869 ]

          Arnab Banerjee added a comment - - edited

          hi jglick, thanks for sharing the info but the issue you mentioned (https://issues.jenkins.io/browse/JENKINS-70869) talks about an option is marked as resolved..
          Is this the default behavior of pipeline-groovy-lib plugin now that it doesn't create the @libs folders?
          If that's the case can you please share the Jenkins version that has the fix (We are using Jenkins 2.332.4 with "Pipeline: Groovy LibrariesVersion 629.vb_5627b_ee2104" and it still creates these on controller nodes)?
          If not, then could you please add some guidance on how to achieve this?

          Arnab Banerjee added a comment - - edited hi jglick , thanks for sharing the info but the issue you mentioned ( https://issues.jenkins.io/browse/JENKINS-70869 ) talks about an option is marked as resolved.. Is this the default behavior of pipeline-groovy-lib plugin now that it doesn't create the @libs folders? If that's the case can you please share the Jenkins version that has the fix (We are using Jenkins 2.332.4 with "Pipeline: Groovy LibrariesVersion 629.vb_5627b_ee2104" and it still creates these on controller nodes)? If not, then could you please add some guidance on how to achieve this?

          Okay.. I see the new version released 3 days back has some relevant information..
          https://plugins.jenkins.io/pipeline-groovy-lib/releases/

          Adding this to the other ticket as well for easy access

          Arnab Banerjee added a comment - Okay.. I see the new version released 3 days back has some relevant information.. https://plugins.jenkins.io/pipeline-groovy-lib/releases/ Adding this to the other ticket as well for easy access
          Tatu Kairi made changes -
          Assignee Original: Eficode [ eficode ]

            allan_burdajewicz Allan BURDAJEWICZ
            xbw1220 Bowei
            Votes:
            7 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: