I am new to BitBucket pipelines, as I used Webhook for deploying my changes to FTP.
I have set reccommended atlassian/ftp-deploy:0.2.0 pipeline and it works fine, BUT I would like to set that ONLY CHANGED files are taken and sent to FTP.
image: node:10.15.3
pipelines:
default:
- step:
name: FTP Deploy
script: # Modify the commands below to build your repository.
- pipe: atlassian/ftp-deploy:0.2.0
variables:
USER: 'myFTPusername'
PASSWORD: 'myFTPpass'
SERVER: 'myFTPserver'
REMOTE_PATH: 'myFTPpath'
- step:
name: Deploy message
deployment: test
script:
- echo "Deploying to main environment"
Any help how to set this up so it sends only changed files to FTP?
Expected output is code for bitbucket-pipelines.yml
Bitbucket Deployments is built for teams doing continuous delivery, which generally means deploying to SaaS/web environments at least once per week, and preferably much more often. We believe this is the future of software development, and want to help as many teams get there as possible.
atlassian/ftp-deploy:0.3.6
delete all files, I found this image wagnerstephan/bitbucket-git-ftp:latest
it's very useful, light and runs well and updates only changed files.
The first pipeline will run with an error, so select the commit
then run again the pipeline with the init
option selected.
image: wagnerstephan/bitbucket-git-ftp:latest
pipelines:
custom:
init:
- step:
script:
- git reset --hard
- git ftp init -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST/
deploy:
- step:
script:
- git reset --hard
- git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST/--all
branches:
develop:
- step:
name: Deploy Develop
deployment: develop
script:
- git reset --hard
- git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST/
master:
- step:
name: Deploy production
deployment: production
script:
- git reset --hard
- git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST/
NOTE: check the name of the environments in the Bitbucket repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With