edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
714 stars 110 forks source link

How to deploy to Google Cloud bucket? #142

Open arslancharyev31 opened 5 years ago

arslancharyev31 commented 5 years ago

Good day. I was wondering it is possible to deploy the files and manifest directly to Google Cloud bucket? I've seen an optional scp target in the build.gradle of example project, but from what I found out, it is possibly to copy files to buckets using google's gsutil cli tools. It is also possible to scp to Compute Engine's VM. So my question is if it is possible to directly deploy to a Bucket?

edvin commented 5 years ago

You can wrap a shell script or batch file around your build invocation and call whatever deploy command you need from there :)

arslancharyev31 commented 5 years ago

Thanks for reply. Because I'm quite inexperienced in this regard I would greatly appreciate if you could provide a small "hello world" snippet how to do that. In the long run, it may be useful to have a deployGBucket confiurable gradle command (like deployS3). If I figure out how to do that, I could contribute pull request that implements such behavior, which might be useful for other users.

edvin commented 5 years ago

That could be as easy as:

#!/bin/bash
mvn clean package
scp -rv target/app/* username@somehost:some/path

The scp command could be changed out for whatever command you need to run to deploy the app. The mvn command could be changed out for your gradle build command.

I think you'll find it will be quite easy to add a custom option to the gradle project, take a look at the source code - it's pretty self explanatory :) A PR would be much appreciated!