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
11
votes
1 answer

Is there a way to allow cloudbuild steps to access the Cloud SQL in GCP

I'm setting up a cloud build trigger in order to deploy a PHP/Symfony Application. When the docker file runs the php app/console assetic:dump command in order to create the assets I get the following error. SQLSTATE[HY000] [2002] Connection timed…
10
votes
3 answers

Can I persist yarn install cache during docker build using RUN --mount=type=bind?

I'm trying to generate and re-use a yarn install cache when building a Docker image using Docker BuildKit. The yarn cache is persisted in the directory .yarn/cache and should never be included in the final image (.yarn/cache is relative to the build…
10
votes
3 answers

In GCP, through Cloudbuild how can I ensure that only those steps get triggered for which changes have happened in file

My issue is that, given the below yaml file, if I'm making changes for example in any file of "dir: process/cbd-bu-data", Cloud Build runs all the steps serially when triggered. This leads to wastage of time. I want that only that step runs in…
10
votes
6 answers

How to upgrade node js version on google cloud build

So I recently upgraded my app from Angular 7 to Angular 8 and I'm having issues with the node version of the cloud build VM as Angular 8 requires node version 10.9 or greater as shown below: How can I upgrade the node version of the Google cloud VM…
10
votes
2 answers

How to use private, self hosted NPM package with Google App Engine node, standard environment

I have an NPM package hosted on a private Bitbucket git repo (not in the official NPM registry). I have this in my package.json, under the "dependencies" key: "a-private-package" git+ssh://git@bitbucket.org:myusername/a-private-package.git It works…
zino
  • 1,222
  • 2
  • 17
  • 47
10
votes
1 answer

Google Cloud Build not caching custom build steps?

Is it possible to have Google Cloud Build cache custom build step images? It appears to re-download them every build regardless of latest vs specific tags used in the name, which makes things slower as opposed to faster.
Alex Zuzin
  • 101
  • 1
  • 2
10
votes
7 answers

How to run a Google Cloud Build trigger via cli / rest api / cloud functions?

Is there such an option? My use case would be running a trigger for a production build (deploys to production). Ideally, that trigger doesn't need to listen to any change since it is invoked manually via chatbot. I saw this video CI/CD for Hybrid…
10
votes
1 answer

cloudbuild.yaml include a different cloud builder configuration

My project is split into gitmodules like so: / + | +-module_1 | | | +- cloudbuild.yaml | +- src/ | +-.git/ | +-module_2 | | | +- cloudbuild.yaml | +- src/ | +-.git/ | +- .git/ +- .gitmodules +-…
9
votes
2 answers

Firebase Cloud messaging - permissions error for cloud build deployed app

I have a java spring boot backend app, that I am trying to hook up to Firebase Cloud Messages. I have an android app that uses firebase and I am trying to use this backend to push notifications. I've generated a private key from firebase console…
9
votes
2 answers

understanding "action required" email from GCP, re: enable Cloud Build API

I use Firebase for my web apps, not Google Cloud Platform -- though I'm aware that behind the scenes, every Firebase project is also a GCP project. I just received an email from GCP, saying (excerpted): [Action required]: Enable the Cloud Build…
9
votes
3 answers

Bazel - Build, Push, Deploy Docker Containers to Kubernetes within Monorepo

I have a monorepo with some backend (Node.js) and frontend (Angular) services. Currently my deployment process looks like this: Check if tests pass Build docker images for my services Push docker images to container registry Apply changes to…
Florian Ludewig
  • 4,338
  • 11
  • 71
  • 137
9
votes
3 answers

Trigger Google Cloud Build with Google Cloud Scheduler periodically

Is it somehow possible to trigger a Google Cloud Build with Google Cloud Scheduler periodically? I can't find anything related to it on the Internet.
9
votes
3 answers

Secret environment variables in Cloudbuild (with out files), how?

I am creating a CI/CD pipeline in Cloud Build of a very basic Node.js app with deployment to GCP appengine standard. None-secret environment variables are stored in app.yaml file. But of course I don't want to put my secrets there. In fact I don't…
8
votes
3 answers

Application Default Credentials in Google Cloud Build

Within my code, I am attempting to gather the Application Default Credentials from the associated service account in Cloud Build: from google.auth import default credentials, project_id = default() This works fine in my local space because I have…
8
votes
1 answer

Programmatically Connecting a GitHub repo to a Google Cloud Project

I'm working on a Terraform project that will set up all the GCP resources needed for a large project spanning multiple GitHub repos. My goal is to be able to recreate the cloud infrastructure from scratch completely with Terraform. The issue I'm…
1 2
3
94 95