0

I’m trying to deploy a simple google Function written in Java, but something is going wrong. this is my serverless.yaml

service: report-connector

provider:
    name: google
    runtime: java11
    region: ${opt:region}
    project: report-connector
    credentials: ~/.gcloud/keyfile.json

    deploymentBucket:
        name: report
    deploymentPrefix: deploy

package:
    artifact: target/${self:service}.jar

functions:
    getReport:
        handler: GetReport
        name: GetReport
        description: Get Report
        events:
            - http:
            path: /getReport

When I run the command:

serverless deploy --region europe-west3

I get this stack:

$ serverless deploy --region europe-west3 -v
Serverless: Packaging service…

and nothing else.

Could you help me to figure out the problem?

Thank you.

  • I solved the problem – Cotrariello Apr 07 '21 at 12:34
  • It is awesome that you solved the problem, could you please write an Answer in case another person stumbles upon the same issue? – Jane Jetson Apr 26 '21 at 15:52
  • Hi @JaneJetson, I solved using another way to deploy it. Serverless Framework, in this case, don't work very well yet. I build the java project with maven, using compile plugin to inlcude all dependencies; then I zip the jar and then create the Google Function direct from the Google Console. I hope this help all of you. Write me for more info. – Cotrariello Apr 28 '21 at 10:00

1 Answers1

1

The issue was solved by following steps:

  1. Build the java project with maven
  2. Use a compile plugin to include all dependencies
  3. Zip the jar and then create the Google Function direct from the Google Console.