Last active
October 11, 2020 22:45
-
-
Save Vertigo093i/85a4ea600ecbf181d4d3 to your computer and use it in GitHub Desktop.
Howto: Atlassian Bamboo and Git LFS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"${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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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% | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 $?) |
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.
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
The trick is to not configure agents with
git lfs install
or at least configure them withgit 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).