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

Bitbucket pipeline successful via ftp but the new file/change was not found in the server hosting

Indra Oei
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2022

This is my first time using bitbucket pipeline to deploy changes to the server. I've tried a lot of scripts before and the script below seems to be the one that run successfully. But even though in bitbucket it says that the pipeline was successful, I can't find the updated or newly created file in the server hosting. But if the file was updated normally in bitbucket repository source.

Can anyone familiar with bitbucket pipeline help me? I basically want to automate deployment from master branch (when there is a push to master) to a remote server host via FTP. 

Note: as for the FTP credentials, I have tried connecting it via apps like FileZilla and it works perfectly fine. So, the problem was not the FTP credentials

image: wagnerstephan/bitbucket-git-ftp:latest
- step:
name: Deploy to Production
deployment: production
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2022

Hello @Indra Oei ,

Thank you for reaching out to Atlassian Community! 

Accordingly to the git-ftp documentation , before using the ftp push, you should init the FTP tracking in the remote by executing the git ftp init : 

git ftp init 

You can clone the repository and execute the above command in your local, so all the files will be uploaded to the FTP site. After that, you should be able to normally execute the git ftp push in the pipelines to only synch the changed files.

In case the above does not work, I'd need more verbose logging for the investigation, so could you please update your pipeline to run the push with the -vv flag, like below ?

git ftp push -vv --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST

Once you run it with the verbose flag, please share with us the log output.

Additionally, as an alternative to git ftp you could also make use of the FTP pipe to deploy the files to your remote server, as the example below : 

  - pipe: atlassian/ftp-deploy:0.3.7
      USER: '<string>'
      PASSWORD: '<string>'
      SERVER: '<string>'
      REMOTE_PATH: '<string>'

Pipe documentation and examples:

Hope that helps! Let me know in case you have any questions.

Thank you, @Indra Oei .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events