I tried many times to execute a Continuous Integration via BitBucket Pipeline (beta). For the moment I need a very simple task, just update my remote server when a push is made on repository (In the past I used for this purpose CodeShip with a very similar syntax).
In Pipelines is necessary to set up a file called bitbucket-pipelines.yml
which contains several rows to differentiate between branches, etc. but the main instruction is:
- lftp -c "open -u $FTP_USER,$FTP_PASSWORD ftp.mydomain.com; set ssl:verify-certificate no; mirror -Rne /opt/atlassian/bitbucketci/agent/build /clone/ /public_html/dev"
Unfortunately it does not run correctly because it failed (apparently with infinite loop and new attempts).
I tried to discuss this topic with Support but I did not recieve any useful help and in the final message, they simply suggested me other resources.
Maybe, is there anybody that set up succesfully a similar things?
Thanks
If its just a git push you want, you could try this.
image: samueldebruyn/debian-git
pipelines:
default:
- step:
script:
- echo "Pipeline Init"
- apt-get update
- apt-get -qq install git-ftp
- echo "'_$(git status -uno --porcelain | wc -l)_'"
- git status -uno --porcelain
- echo "Initiating Push site:Source."
- git config git-ftp.syncroot Source/
- git ftp init --user $Username --passwd $Pwd ftp://domain.com/public_html/
Once you have done the first push (init), change the code git ftp init
to git ftp push
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