Questions tagged google-cloud-build

Explore the latest questions and answers asked by our top developers.

Dockerfile COPY command is missing a single file

I have run into an incredibly frustrating problem where a COPY command in my Dockerfile successfully copies all of my apps files except one. I do not have a .dockerignore file so I know the file isn’t being excluded from the build that way. Below is what my directory looks like: app -app -data file1.txt […]

By Will Evo
Published
Categorised as docker, google-cloud-build, python Tagged , ,

How to run angular test using Cloud Build?

I use out-of-the-box Angular testing framework: Jasmine and karma for Unit Test and GCP Cloud Build to deploy the app. However, there is a problem in testing because there is no Chrome installed for the node Docker image. What is the best way to handle that? Create a customized docker image? Or is there any […]

Pass firebase private key from secret manager to cloud build container

I am building a golang application which uses the firebase admin sdk on cloud build . I created the private key(json file) and stored it in secret manager . I am declaring in my Docker file an ARG GOOGLE_APPLICATION_CREDENTIALS and on my build step of the cloudbuild.yaml I am passing the secret as an argument […]

Google Cloud Build yaml docker environment variable

I am trying to set an environment variable in a docker image via a cloudbuild.yaml for Google Cloud Build Here is the sample cloudbuild.yaml: steps: – name: "gcr.io/cloud-builders/docker" args: ["run", "–rm", "–volume=/foo:/bar", "–privileged", "-e FOO=bar", "my/build:latest", "/root/init_build.sh" ] timeout: "600s" When I run on the command line locally and pass the environment variables into the […]

(GCP) ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: could not resolve source: googleapi: Error 403: [email protected]

I’m trying to upload a docker image to GCR(Google Container Registry) with Cloud Shell but I got this error message: ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: could not resolve source: googleapi: Error 403: [email protected] does not have storage.objects.get access to the Google Cloud Storage object., forbidden This is the steps which I’ve done. (1st step) I ran this […]

Build a container image from inside a cloud function

Context: I am training a very similar model per bigquery dataset in Google Vertex AI, but I want to have a custom training image for each existing dataset (in Google BigQuery). In that sense, I need to programatically build a custom Docker Image in the container registry on demand. My idea was to have a […]

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 set the environment variable GOOGLE_APPLICATION_CREDENTIALS appropriately. However, when this line is executed (via a test step in […]

maven:3.8.3-jdk-11 not able to package appengine:stage

I have a Java 8 Spring Boot app that is deployed to Google App Engine and being built via GCP CloudBuild. I am trying to upgrade it from Java 8 to Java 11. In the cloudbuild.yaml file, I changed: – id: ‘Build and Test’ name: ‘gcr.io/cloud-builders/mvn:3.5.0-jdk-8’ args: [‘package’, ‘appengine:stage’] to: – id: ‘Build and Test’ […]

Maven upgrade unable to run package appengine:stage

I have a Java 8 Spring Boot app that is deployed to Google App Engine and being built via GCP CloudBuild. I am trying to upgrade it from Java 8 to Java 11. In the cloudbuild.yaml file, I changed: – id: ‘Build and Test’ name: ‘gcr.io/cloud-builders/mvn:3.5.0-jdk-8’ args: [‘package’, ‘appengine:stage’] to: – id: ‘Build and Test’ […]

Why Google Cloud Build execute all my triggers

I am using Google Cloud Build as CI for building docker images. I have one repository and multiple subdirectories for each microservice (with Dockerfile and cloudbuild.yaml files). I have trigger for each microservice which watch only specific subdirectory (Included files filter). For caching docker layers I am using Kaniko. My cloudbuild step looks like as […]

1 9

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq