Bamboo Artifact transfer fails with exception "not contained within the working directory"

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 12.0.0, 10.2.4, 11.0.1
    • Affects Version/s: 10.2.2, 9.6.11
    • Component/s: Artifacts
    • None
    • 1
    • Severity 2 - Major
    • 1

      Issue Summary

      Post upgrading Bamboo to 9.6.11, the artifact transfer fails with below exception when Artifacts are located outside of the Working directory and Package threshold is enabled which will zip the large numbers of files

      error	06-May-2025 16:47:38	com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler: File /var/atlassian/application-data/bamboo-agent/classpath/FastInfoset-1.2.15.jar not contained within the working directory /var/atlassian/application-data/bamboo-agent/xml-data/build-dir/BAM-BOO-JOB1
      
      error	06-May-2025 16:47:38	Unable to publish artifact [art]: Unable to publish artifact Required job artifact Http Compression On : [art], patterns: [**/*] anchored at: [/var/atlassian/application-data/bamboo-agent/classpath] for BAM-BOO-JOB1-12 via com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler@34a56c00 
      

      Steps to Reproduce

      1) Define the artifact as below, In the location mention it as /var/atlassian/application-data/bamboo-agent/classpath, this is outside the build working directory. 

       
      2) Disable the Bamboo server artifact handler Package threshold

      3) Run the build and it will complete successfully.

      4) Now enable the Package threshold as below

      Expected Results

      The artifacts should be transferred even after the Package threshold is enabled.

      Actual Results

      The Artifact transfer fails with below exception

      error	06-May-2025 16:47:38	com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler: File /var/atlassian/application-data/bamboo-agent/classpath/FastInfoset-1.2.15.jar not contained within the working directory /var/atlassian/application-data/bamboo-agent/xml-data/build-dir/BAM-BOO-JOB1
      
      error	06-May-2025 16:47:38	Unable to publish artifact [art]: Unable to publish artifact Required job artifact Http Compression On : [art], patterns: [**/*] anchored at: [/var/atlassian/application-data/bamboo-agent/classpath] for BAM-BOO-JOB1-12 via com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler@34a56c00 
      

      Workaround

      1. Disable the Package threshold
      This might have another negative effect where the Artifacts might consume more storage and transfer might be slow, as the artifacts won't be zipped.
       
      2. Move all the Artifacts under the working directory of the build

        1. screenshot-1.png
          66 kB
          Shashank Kumar
        2. screenshot-2.png
          13 kB
          Shashank Kumar
        3. screenshot-3.png
          21 kB
          Shashank Kumar

            Assignee:
            Mateusz Szmal
            Reporter:
            Shashank Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h