Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,198
Community Members
 
Community Events
165
Community Groups

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

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
pipelines:
branches:
master:
- step:
name: Deploy to Production
deployment: production
script:
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST

1 answer

1 vote
Patrik S Atlassian Team 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 : 

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

Pipe documentation and examples: https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/ftp-deploy

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
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,225 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you