Skip to content

Instantly share code, notes, and snippets.

@Vertigo093i
Last active October 11, 2020 22:45
Show Gist options
  • Save Vertigo093i/85a4ea600ecbf181d4d3 to your computer and use it in GitHub Desktop.
Save Vertigo093i/85a4ea600ecbf181d4d3 to your computer and use it in GitHub Desktop.
Howto: Atlassian Bamboo and Git LFS
"${bamboo.capability.system.git.executable}" config remote.origin.lfsurl ${bamboo.planRepository.repositoryUrl}
"${bamboo.capability.system.git.executable}" lfs install --local
"${bamboo.capability.system.git.executable}" lfs pull || "${bamboo.capability.system.git.executable}" lfs logs last
@echo off
"%bamboo_capability_system_git_executable%" config remote.origin.lfsurl %bamboo_planRepository_repositoryUrl%
"%bamboo_capability_system_git_executable%" lfs install --local
"%bamboo_capability_system_git_executable%" lfs pull
if errorlevel 1 (
"%bamboo_capability_system_git_executable%" lfs logs last
exit /b %ERRORLEVEL%
)
#!/bin/sh
"$bamboo_capability_system_git_executable" config remote.origin.lfsurl ${bamboo_planRepository_repositoryUrl}
"$bamboo_capability_system_git_executable" lfs install --local
"$bamboo_capability_system_git_executable" lfs pull || ("$bamboo_capability_system_git_executable" lfs logs last && exit $?)
@Vertigo093i
Copy link
Author

Vertigo093i commented Feb 29, 2016

The trick is to not configure agents with git lfs install or at least configure them with git lfs install --skip-smudge.
Then add one of the scripts right after standard repository checkout task.

And ensure agents can access the original repository (an example about configuring SSH access is here).

@vekunz
Copy link

vekunz commented May 23, 2016

Hi, is this method also usable with lfs inside of submodules? Currently I use the command git submodule foreach git lfs pull but it fails.

@Vertigo093i
Copy link
Author

Unfortunately I have very limited experience with submodules. And no concerning LFS at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment