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

Bamboo is incompatible with setting alternate LFS URLs in .lfsconfig

    XMLWordPrintable

Details

    Description

      Summary

      Since Bamboo performs a Git LFS fetch before checking out the branch, any changes made to the .lfsconfig (e.g. to change the LFS URL) are not respected for the fetch and the fetch will fail if the base repository doesn't have LFS support.

      Steps to Reproduce

      1. Change lfs.url in the .lfsconfig and push it to the repository
        E.g.
        [lfs]
                url = https://my_example/lfs/lfsrepotest.git/info/lfs
        
      2. Perform a Bamboo build using an LFS enabled repository and a source-code checkout

      Expected Results

      LFS files are fetched from the LFS URL configured in .lfsconfig

      Actual Results

      LFS files are attempted to be fetched from the repository URL.

      Notes

      Setting the lfs.url in the global git config is respected, but is not a viable solution on a build server utilizing many repositories with LFS objects in different locations:

      git config --global lfs.url https://alternate-lfs-repository/info/lfs
      

      Workaround

      1. Disable LFS support at Repository Configuration > Advanced Options > Enable LFS
      2. Use a script task after the source-code checkout task to do a LFS pull
        git remote set-url origin ssh://repository:7999/proj/repo.git
        git lfs pull
        git remote set-url origin file://nothing
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jowen@atlassian.com Jeremy Owen
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: