Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

GIT LFS in Bitbucket Pipelines

kaique_tavares February 20, 2020

Hello everyone, I would like to know if any member of the community was able to deploy using the pipe: atlassian / ftp-deploy: 0.3.0 in repositories that use git lfs to store large files?

PROBLEM: Apparently the bitbucket pipelines does not yet have support for git LFS, we are trying to deploy to our homologation server, but the images are not being carried out the normal conversion at the time of the ftp transfer. Below is the code we use in the pipeline:

image: php:7.1.29
pipelines:
default:
-
step:
name: Executar-deploy-Homolog-SCS
deployment: HOMOLOG - DEVSCS
script:
-
pipe: atlassian/ftp-deploy:0.3.0
variables:
USER: $FTP_USER
PASSWORD: $FTP_PASSWORD
REMOTE_PATH: $FTP_HOMOLOG
LOCAL_PATH: "dist"
SERVER: $IP_SERVER
DEBUG: "true"

After a commit the above pipeline is executed, the output we have on our server with the LFS files from the repository is not as expected, following images below:

 

Problema_Pipelines_Montagem.png SOLUTION: After some research I was able to verify that the pipeline executes the following command (image below):

Problema_Pipelines_03.png

GIT_LFS_SKIP_SMUDGE=1 git clone won't fetch all binary files by default

Would it be possible to remove this parameter during the pipeline setup? Is this the real cause of the problem?

1 answer

1 accepted

5 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020

Hello @kaique_tavares ,

Thanks for reaching out.

It looks like you didn't specify a property to enable LFS, as described on this page:

clone:
lfs: true

There's also a blog post with little bit more details on how that works.

Hope this helps.

Cheers,
Daniil

Chris Smith February 20, 2020

I can confirm this works.  I have the same in my own bitbucket-pipelines.yml

Like 조승현/Mobility QE likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events