0

I have a Go application wich needs GCC during the build process. The default GAE Go runtimes don't support GCC, so I had to configure my app.yaml to define the runtime as custom like this:

runtime: custom
env: flex

network:
  session_affinity: true

manual_scaling:
  instances: 1

Plus, adding a docker file like:

FROM golang:latest
RUN mkdir /app
ADD . /app/
WORKDIR /app
RUN go build -o main .
CMD ["/app/main"]

The problem is that I can't automate the deployment from Cloud Build after Push trigger because GAE deployment doesn't accept having Dockerfile and cloudbuild.yaml defined together. At the same time if I added a cloudbuild.yaml like:

-steps:
  - name: "gcr.io/cloud-builders/gcloud"
    args: ["app", "deploy"]
timeout: "1600s"

I will be forced to delete the Dockerfile! Is there anyway way to automate the GAE build and deploy with custom runtimes?

Montaro
  • 137
  • 1
  • 7

1 Answers1

0

Looking into the situation you described I could find the relevant public threads on GitHub and StackOverflow.

As an option, try to move the cloudbuild.yaml file into a sub-folder to mitigate the issue. Remember to update the Cloud Build trigger to point to the moved file.

Let me know if it helps!

Deniss T.
  • 255
  • 1
  • 8