On Windows, Elastic Bamboo Agent cannot clean source directory containing NTFS junctions

XMLWordPrintable

    • 2
    • Severity 2 - Major

      On Windows, Bamboo Agent will fail when trying to do a clean build on a source directory which contains broken NTFS junctions.

      For example, our binaries are put into a subdirectory of our main source code tree. For example:

      build-dir/JOB1/SourceCode/build-artifacts

      During the build process, relative NTFS junctions are created within build-artifacts, pointing to other locations within SourceCode:

      build-artifacts/directory1 ---> ../ParentDirectory1
      build-artifacts/directory2 ---> ../ParentDirectory2

      When Bamboo agent tries to clean the build directory, it first deletes ParentDirectory1 and ParentDirectory2, breaking the junctions.

      Then when the directory-walking code tries to access build-artifacts/directory1, it fails. This throws an exception and the cleaning process fails. Subsequently the entire build fails.

      Code should be fixed to detect broken junctions and delete them without trying to walk further down in the hierarchy.

      NOTE: We use Bamboo OnDemand. Currently at version 5.2

            Assignee:
            Unassigned
            Reporter:
            Tech Vendors
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: