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

atlassian/ftp-deploy:0.2.1 uses lots of minutes

ericgerhardy September 11, 2019

Hello guys!

I'm quite new to Bitbucket pipelines and I recently tried the ftp-deploy (version 0.2.1). After making the initial commit of a single Wordpress installation, the pipeline took 92 min to upload those files to the server.

I know that ftp isn't the fastest way to upload files, but isn't this way to slow?

My configuration is:

pipelines:
default:
- step:
name: Deploy to shared-hosting
script:
- pipe: atlassian/ftp-deploy:0.2.1
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: $FTP_SERVER
REMOTE_PATH: '/'

Thank you!

EDIT: I tried again - this time only 16 small files changed. After I committed those files, the deployment startet to overwrite every single file on the shared hosting and I stopped the process after 5 minutes.

3 answers

1 accepted

0 votes
Answer accepted
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2019

Hey @ericgerhardy. There were service disruptions in Bitbucket recently that could've affected your deployment. I'd suggest that you try to rerun the pipeline to see if the execution time is withing a reasonable time range. If this is not the case, I'd check the size of your repository, as by default, the pipe will upload the entire repo to a remote server. 

Also, since the pipe runs inside docker, the modification times of files isn't preserved. You have to add the --ignore-size option to the EXTRA_ARGS:

- pipe: atlassian/ftp-deploy:0.2.1
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: $FTP_SERVER
REMOTE_PATH: '/'
EXTRA_ARGS: '--ignore-size'

With this option, the pipe will only upload files that have changed in size.

ericgerhardy September 13, 2019

hey @Alexander Zhukov , thank you for your answer! I tried to rerun it, even tough I added '--ignore-size', every single file was overwritten. 

It seems like ftp-deploy isn't the right choice for pushing committed files from local to the shared hosting. I think I'll try 

image: samueldebruyn/debian-git
pipelines:
default:
-
step:
script:
-
apt-get update
-
apt-get -qq install git-ftp
-
git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://w0120406.kasserver.com/

which works like a charm for some projects, but didn't work with the last one, which brought me to ftp-deploy.

Thanks for your help, I appreciate it!

0 votes
javeedrahuman August 13, 2021

Hi @Oleksandr Kyrdan ,

pipe rsync-deploy  changes the files and directories permission.

Is there any option to disable that?

 

Cheers

0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

@ericgerhardy ,

also, you can use pipe rsync-deploy for your case.

According to Rsync man page:

Rsync is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.

Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file’s data does not need to be updated.


Cheers,
Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events