Questions tagged [google-cloud-build]

For programming/API questions about Google Cloud Build, a service that executes builds, regardless of language, on the Google Cloud Platform infrastructure.

The official documentation can be found here: https://cloud.google.com/cloud-build/docs/

1423 questions
64
votes
7 answers

Can I delete container images from Google Cloud Storage artifacts bucket?

I have a Google App Engine app, which connects to Google Cloud Storage. I noticed that the amount of data stored was unreasonably high (4.01 GB, when it should be 100MB or so). So, I looked at how much each bucket was storing, and I found that…
55
votes
7 answers

Cloud Build fails to deploy to Google App Engine - You do not have permission to act as @appspot.gserviceaccount.com

This morning I made a PR which triggered a Cloud Build for my staging enviroment but failed to deploy the results to GAE. The error was as follows: ERROR: (gcloud.app.deploy) PERMISSION_DENIED: You do not have permission to act as…
54
votes
3 answers

Is it possible to cache multi-stage docker builds?

I recently switched to multi-stage docker builds, and it doesn't appear that there's any caching on intermediate builds. I'm not sure if this is a docker limitation, something which just isn't available or whether I'm doing something wrong. I am…
Matthew Goslett
  • 1,127
  • 1
  • 7
  • 6
48
votes
2 answers

Google Cloud Build timing out

I have a Google Cloud Build build that times out after 10 min, 3 sec. Is there a way to extend that timeout? The build status is set to "Build failed (timeout)" and I'm okay with it taking longer than 10 minutes.
munchybunch
  • 6,033
  • 11
  • 48
  • 62
44
votes
5 answers

Deploy individual services from a monorepo using github actions

I have around 10 individual micro-services which are mostly cloud functions for various data processing jobs, which all live in a single github repository. The goal is to trigger the selective deployment of these service to Google Cloud Functions,…
27
votes
9 answers

Google Cloud Build deploy to GKE Private Cluster

I'm running a Google Kubernetes Engine with the "private-cluster" option. I've also defined "authorized Master Network" to be able to remotely access the environment - this works just fine. Now I want to setup some kind of CI/CD pipeline using…
26
votes
5 answers

gcloud - ERROR: (gcloud.app.deploy) Permissions error fetching application

I am trying to deploy node js app on google cloud but getting following error - Step #1: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps /mytest-240512]. Please make sure you are using the correct project ID and that you have…
26
votes
6 answers

How do I set an environment or substitution variable via a step in Google Cloud Build?

Basically, when using Google Cloud Build, how do I read a value that was written in an earlier build step in subsequent steps? Specifically, I'd like to make a custom image tag that's based on a combination of the timestamp and $SHORT_SHA. …
JJC
  • 9,547
  • 8
  • 48
  • 53
23
votes
4 answers

Failed to get existing workspaces: querying Cloud Storage failed: storage: bucket doesn't exist

I was using terraform in cloud build, but it fails at this step steps: # Terraform - id: 'configure_terraform' name: node:10.16.3 entrypoint: "node" args: ["./create_terraform_config.js", "../terraform/override.tf", …
Elona Mishmika
  • 480
  • 2
  • 5
  • 21
23
votes
2 answers

Using Docker Buildkit on Google Cloud Build

I'm trying to use BuildKit with Docker on Google Cloud Build so that I can eventually use the --secret flag. I'm using Build Enhancements for Docker as a reference. It works on my laptop when I use the following command: DOCKER_BUILDKIT=1 docker…
Mark
  • 251
  • 2
  • 6
23
votes
7 answers

How to set environment variables using Google Cloud Build or other method in Google App Engine Standard Environment?

Is there anyway to inject environment variables from Cloud Build into the App Engine Standard environment? I do not want to push my environment variables to GitHub inside the app.yaml or .env. Thus, when Cloud Build pulls and deploys it is missing…
23
votes
3 answers

GitHub Cloud Build Integration with multiple cloudbuild.yamls in monorepo

GitHub's Google Cloud Build integration does not detect a cloudbuild.yaml or Dockerfile if it is not in the root of the repository. When using a monorepo that contains multiple cloudbuild.yamls, how can GitHub's Google Cloud Build integration be…
sabrehagen
  • 1,517
  • 1
  • 13
  • 38
20
votes
5 answers

Run node.js database migrations on Google Cloud SQL during Google Cloud Build

I would like to run database migrations written in node.js during the Cloud Build process. Currently, the database migration command is being executed but it seems that the Cloud Build process does not have access to connect to Cloud SQL via an IP…
19
votes
2 answers

How can I specify a region for the Cloud Storage buckets used by Cloud Build for a Cloud Run deployment?

When deploying a docker container image to Cloud Run, I can choose a region, which is fine. Cloud Run delegates the build to Cloud Build, which apparently creates two buckets to make this happen. The unexpected behavior is that buckets aren't…
19
votes
6 answers

Specify Dockerfile for gcloud build submit

I understand gcloud uses the Dockerfile specified in the root directory of the source (.) as in the command: gcloud builds submit --tag gcr.io/[PROJECT_ID]/quickstart-image . but I am trying to specify the Dockerfile to use to build the image which…
idrisadetunmbi
  • 877
  • 2
  • 9
  • 22
1
2 3
94 95