Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-16970

Fix absolute paths for artifacts being changed to relative paths

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 5.12.4, 5.13.0.1
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      When I set an artifact to /var/lib/docker in a build job's properties, it's changed to a relative path

      Unable to publish artifact [Docker Cache]: the source directory /home/bamboo/bamboo-agent-home/xml-data/build-dir/BB-THING-JOB1/var/lib/docker does not exist.
      

      Never in any application should a path that starts with / be changed to a relative path. It specifically breaks making artifacts from global operating system cached files, and it also breaks reasonable expectations for relative files in a POSIX environment.

      I was able to get the artifact published with a six ../ in a row, by changing the artifact path to: ../../../../../../var/lib/docker:

      Publishing an artifact: Docker Cache
      Finished publishing of artifact Shared artifact: [Docker Cache], pattern: [**/*] anchored at: [../../../../../../var/lib/docker] in 5s
      Finalising the build...
      

      However the problem surfaces later during deployment:

      Preparing to download plan result BE-CORE-35 artifact: Shared artifact: [Docker Cache], pattern: [**/*] anchored at: [../../../../../../var/lib/docker]
      Unable to download artifact Shared artifact: [Docker Cache], pattern: [**/*] anchored at: [../../../../../../var/lib/docker]
      

      Because of this bug, I don't see a way to use artifacts that are outside of the build directory unless they're manually moved inside it.

      Workaround

      • create a symbolic link to an external path inside your build directory.

            [BAM-16970] Fix absolute paths for artifacts being changed to relative paths

            Conny Postma made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 190528 ]
            Jacek Krawczyk (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 716858 ]
            Jacek Krawczyk (Inactive) made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 716858 ]
            Jacek Krawczyk (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 715486 ]
            Jacek Krawczyk (Inactive) made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 715486 ]
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3375561 ] New: JAC Suggestion Workflow 3 [ 3609226 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1442703 ] New: JAC Suggestion Workflow [ 3375561 ]
            Issue Type Original: Task [ 3 ] New: Suggestion [ 10000 ]
            Rachel Robins made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 235203 ] New: This issue links to "Page (Atlassian Documentation)" [ 235203 ]
            Rachel Robins made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 235203 ] New: This issue links to "Page (Atlassian Documentation)" [ 235203 ]
            Rachel Robins made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 235203 ]

              pbruski Przemek Bruski
              025f9d74fb58 nhooey
              Votes:
              2 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: