I have pipelines enabled in my Bitbucket repository and I need to run Angular 2 build and deploy the dist folder (which gets created after the build command is executed) in my s
I don't think Git FTP is what you want here. If you look at their website the reason its a product at all is to only deploy files that changed. My suspicion is that your dist
folder will be recreated in its entirety each time you build. Even if that's not the case, they state:
It keeps track of the uploaded files by storing the commit id in a log file on the server. It uses Git to determine which local files have changed.
The Bitbucket Pipelines instances are ephemeral, so there's nowhere to store the log. That undermines the motivation for using git-ftp
at all. I suppose you could push the log somewhere and retrieve it, but I would be surprised if that were worth your time.
I don't think there's anything particularly special about what you're trying to do - Angular and Git just happen to be involved, but you're just trying to move a folder from one machine to another. There are tons of software products that would be available to help you with that, but scp
, which stands for Secure Copy, is one of the more popular ones which is included in many Linux distributions (what Docker container are you building off?). You can see numerous examples here, but essentially I think what you want to do comes down to:
scp -i /path/to/your/.pemkey -r /copy/from/path user@server:/copy/to/path
(Example taken from this StackOverflow question)
Note that you'll have to make sure the server you're going to is publicly accessible, otherwise there's no way to route from the Pipelines build to the target computer (so far as I know)