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
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 :
- : atlassian/ftp-deploy:0.3.7
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 .
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...
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