Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9488

Jenkins cleanup script can delete the current build's directory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 9.4.0.CR3
    • 9.4.0.CR1
    • CI
    • Sprint 9.4.0.CR3

    Description

      Our Jenkinsfile runs cleanup.sh (provisioned on each agent via Ansible) to make room for the new build. The idea is to keep the checked-out sources after a build, so that the next build for the same branch is faster, and cleanup.sh only deletes the workspace directories of old builds if there's less than 10gb of free space.

      There is a problem, however: the agent may have less than 10GB of free space after deleting all the old workspace directories, and cleanup.sh will happily delete the current build's workspace to make more room. Obviously, the build fails afterwards:

      ERROR: missing workspace /home/infinispan/workspace/Infinispan_PR-6236-6TTBGFU5OA5XZXKEPJRZI245GOIWTNAUH3HC5M6B36G25UNJPTCA on rhos-infinispan-slave-4.localdomain
      

      Unfortunately we also use `returnOutput: true` when running the cleanup script, so it's not obvious who is deleting the build directory.

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Diego Lovison Diego Lovison
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: