Beanstalk style FTP deployment using "git-ftp" per project
I just found this idea on the GitHub issues page. Its a great idea ! would love to see this implemented here is more info
You may be aware of beanstalk's deployment over FTP option.
Today, I came across this - https://github.com/resmo/git-ftp. git-ftp helps deploy (push) to a remote server using typical FTP details (host, user & pass)
Gitlabhq can have few extra option per project say "Add FTP Server".
A user will fill in FTP details for a project.
Then whenever a project is updated gitlabhq will use git-ftp to "push/deploy" latest changes to added FTP server on that repo.
I feel git-ftp should be run from server side as a user will need to provide FTP details only once even if many developer are working on same projects.
Also from server to server, speed is faster (assuming your gitlab setup is on a dedicated/VPS box rented from typical hosting company).
Original Post https://github.com/gitlabhq/gitlabhq/issues/1348
Massimiliano Cuttini commented
Without this feature GITLAB could increase the overall time consumption needed to manage and update projects instead of decrease it.
Josef Kufner commented
Why web-hooks are not enough for this? The only problem i see is that webhook needs to run via web server, so it may not be suitable for many non-web use-cases.
What about adding SSH-hook? Instead of URL it sould have host name, user name, port, private key (or password), and command. Everything else is the same as current web-hook.
Everything else is up to the script you call from the hook.
Todong Ma commented
I found a ftp git tool which is much easier to use: Ftp-Git (http://redino.net/ftp-git/). It's a GUI ftp deployment tool which can push changed files in git repository to your ftp server. (All in a GUI way)
I've also written a little PHP script that that does deployments through FTP. It si called PHPloy](https://github.com/banago/PHPloy) and is tightly-coupled with Git to determine what which files where edited/added/deleted and uploads them accordingly. You put your FTP details in a deploy.ini file and run just a command to deploy:
You can also deploy to multiple servers at once. And if you have multiple servers configured, you can select to deploy to one of them like this:
phploy --server staging
There is more that can be done - check it out on Github: https://github.com/banago/PHPloy
This would be incredible!
Thomas Deinhamer commented
It would be awesome to have something implemented in GitLab CI.
1000+ For this! It would be awesome to have such a feature in GitLab!
Consider https://github.com/ezyang/git-ftp instead, as you can specify a branch/server relationship (develop branch goes to ftp://dev.example.com while release branch goes to ftp://staging.example.com, etc.) which matches the git-flow branching model.
Nik Rolls commented
Even a 'deploy' section would be good, where we can specify a sequence of commands to run to deploy the latest code.
Often servers have complex user permissions that are not ideal for (S)FTP (eg, deploy needs to be run as 'www-data' user which you can't login as), but being able to call a web hook manually or run code on the remote server would be great.
Automatic web hooks work well for dev and staging servers, but not for live servers which should always be manual.
Rahul Bansal commented
I thought this idea was killed. Glad to see it here... :-)