Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
119 views

Cloud Build Trigger Fails with PERMISSION_DENIED: Permission 'cloudbuild.builds.create' denied Despite Correct IAM Setup

Problem: I am trying to set up a CI/CD pipeline in Google Cloud Platform using Cloud Build with a GitHub trigger. However, when I attempt to trigger the build using the Cloud Build trigger, I get the ...
William Lin's user avatar
0 votes
1 answer
51 views

I'm having a hard time passing secrets in gcp secret manager to cloud build docker build stage. Am i passing these correctly?

steps: name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim' entrypoint: 'bash' args: '-c' | echo "Fetching secrets from Secret Manager..." echo -n $(gcloud secrets versions access latest -...
Meer's user avatar
  • 1
0 votes
1 answer
47 views

Deploying Cloud Run job works fine, using cloudbuild.yml fails in cryptic manner

This works fine: gcloud run jobs deploy myjob --project myproject --image us-east1-docker.pkg.dev/myproject/myrepo/myimage:latest --region us-east1 It yields: ✓ Creating job... Done. ...
Wells's user avatar
  • 11k
2 votes
1 answer
381 views

How to Properly Inject Service Account Credentials in Google Cloud Build for Cloud Run Deployment?

I’m deploying a Laravel application to Google Cloud Run using Google Cloud Build. During the Docker build process, I need to access Google Secret Manager to inject secrets into the application code ...
ristol's user avatar
  • 41
0 votes
0 answers
66 views

SSH error when using a private GitHub repository as a dependency in a Cloud Build project deployed to Cloud Run

I have a project on GitHub that has a private GitHub repository as one of its dependencies. I'm trying to deploy this project to Google Cloud Run using Cloud Build. I’ve added the private repository ...
Luca Biasotto's user avatar
0 votes
1 answer
274 views

How to use dynamically versioning in cloudbuild.yaml file?

This is my cloudbuild.yaml file. In this file i manually write the version of the new application, but i want to take this automatically by any approach, Is this possible anyhow? steps: Step 1: Build ...
Rishav Kumar's user avatar
0 votes
0 answers
244 views

How does Terraform resolve docker image tags when updating Cloud Run service?

When running terraform apply I was expecting the google_cloud_run_service.example_service.containers.image to be updated in place, as the image value is set to "${local.image}:latest" and a ...
Vyacheslav Gorbov's user avatar
1 vote
0 answers
29 views

Google cloud build and nodejs mysql connect

I'm having hard time to figure how to configure a database connection on cloudbuild.yaml file. cloudbuild.yaml: steps: - name: 'gcr.io/cloud-builders/docker' automapSubstitutions: true env: ...
Leonel Matias Domingos's user avatar
0 votes
1 answer
294 views

How to get the callback of Google's OAuth2 to process it as a route handler?

I've deployed a web app through ExpressJs and I host it on Google Cloud Run. The issue I'm having is that I'm not getting the callback from Google's OAuth2. I have a route handler set as "app.get(...
Marctrix's user avatar
0 votes
1 answer
504 views

Specify startup probe option: gcloud beta run deploy

I have a cloud build pipeline which builds and tries to deploy a multi-container service on Cloud Run. The containers are: Frontend (exposed port 3000) Backend I specified in the cloudbuild.yaml ...
GRS's user avatar
  • 3,104
2 votes
2 answers
2k views

Multicontainer deployment on Cloud Run

It looks like Google Cloud Run supports the sidecar pattern for multiple containers. I wanted to deploy a front-end & backend containers on the same service on Cloud Run. I want to use the same ...
GRS's user avatar
  • 3,104
0 votes
1 answer
433 views

How to delete a service from all regions with gcloud run delete in cloudbuild.yaml

I deploy my service on cloud run, in several regions. My cloudbuild.yaml does this: Build a new image Push new image to Artifact Registry TODO: Stop service in all regions Run database migrations ...
Micka's user avatar
  • 1,834
0 votes
0 answers
168 views

Cloud Build trigger error with roles/run.admin, roles/iam.serviceAccountUser

I have a problem with my Google Cloud project, when I want to deploy the project (web api net core) I get role errors: required oles: roles/run.admin, roles/iam.serviceAccountUser. I tried to activate ...
Jhona JM's user avatar
0 votes
1 answer
403 views

GCP Cloud Run - Cannot update environment variable to string literal because it has already been set with a different type

Problem First of all, this is the error that I have in Cloud Run. Step #2 - "deploy-image-to-cloud-run": ERROR: (gcloud.run.deploy) Cannot update environment variable [...
CCCC's user avatar
  • 6,521
0 votes
1 answer
358 views

How to change google-cloud-run continuous deploy to java version to 17 in buildpack?

I setup a gcp google-cloud-run Java and Spring Boot deployment using the Continuously deploy from a repository option as shown below. This creates an inline Cloud Build trigger with using an inline ...
K.Nicholas's user avatar
  • 11.6k
0 votes
3 answers
302 views

GCP, Container Built with Google Cloud Built and Dockerfile isn't listening on port 8080

I have a cloudbuild job that failed because the container isn't listening on port 8080. But, when I run the container locally, I have no problem accessing it on port 8080. Here are the error, ...
eboraks's user avatar
  • 377
0 votes
1 answer
451 views

Building docker image fails on Google cloud build but works locally

I have Golang project which I am trying to deploy to Google Cloud Run. For this project the idea is to test image building and running before even deploying it to cloud run. Now building this image ...
Nux's user avatar
  • 7,138
1 vote
0 answers
216 views

How to manually delete a cloud build trigger when its missing from the triggers list?

I used to have CloudRun service that would be rebuilt by CloudBuild as soon as something was merged into main of the underlying GitHub repo. That particular CloudRun service has been long deleted but ...
Geom's user avatar
  • 1,556
0 votes
1 answer
222 views

Unable to connect to Cloud SQL (PostgreSQL) instance with Sequelize

I am simply not able to establish a connection to my Cloud SQL instance (PostreSQL). For deployment, I have created a cloudbuild.yamlbut no matter what I try, I'm not able to connect. For now, I am ...
Stefan Falk's user avatar
  • 25.6k
1 vote
0 answers
166 views

GCP Cloud Run container stalls when using Cloud Build to deploy with tag "latest" and same image name

I have spent the last few days investigating this issue and tried many things. The issue started around February 7th, 2024. The summary of the issue is: When I deploy a replacement service to GCP ...
randomdatascientist's user avatar
1 vote
0 answers
383 views

cloud run - build : Your build failed to run: invalid build: invalid image name

iam trying to create and run a cloud trigger but every time i run it it says : Failed to trigger build: invalid build: invalid image name "gcr.io/dashs70e/prName:ef50014": could not parse ...
user23232468's user avatar
0 votes
1 answer
374 views

Django - CSRF verification failed in Cloud Run

EDIT: I tried doing the tutorial again. It now works perfectly so I must have mistyped something in my last attempt I am following this tutorial from Google codelabs. When trying to login to the admin ...
Angelo Orate's user avatar
0 votes
1 answer
406 views

Next.js, GitHub Actions CI/CD, Google Cloud Build & Run, Firebase: Issues with Secrets & Environment Variables

I've successfully build and deployed the webapp onto Google Cloud Run. I'm trying to send call a firebase Cloud Function but it requires some keys for the config, I've entered the keys on my repo's ...
zatum's user avatar
  • 15
0 votes
1 answer
266 views

Cloud Run/Build artifacts buckets are created with Fine Grained access policy by default

When using Cloud Run Jobs (I'd assume any service running Cloud Build under the hood as well), dedicated artifact buckets are created. Their naming is usually something like: us.artifacts.project....
Pepsi133's user avatar
0 votes
1 answer
401 views

deploying cloud-sql-proxy with args and instance id as Cloud Run sidecar

I am trying to deploy the Cloud SQL proxy as a Cloud Run sidecar, and cnanot get args to work correctly - name: 'gcr.io/cloud-builders/gcloud' args: ['beta', 'run', 'deploy', "${_SERVICE_NAME}&...
Pentium10's user avatar
  • 208k
3 votes
3 answers
399 views

Using Docker heredoc with Google Cloud

It's been a while since Docker introduced the ability to use heredoc in the RUN command, and I use it quite often. However, when I tried to use it with Cloud Run, it seems that this feature is not ...
Rodrigo's user avatar
  • 581
0 votes
2 answers
574 views

Google Cloud Build failed, fork/exec ./gradlew: permission denied

I was trying to deploy a test Spring Boot project to Google Cloud Run referring to this Quickstart guide by Google: https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-java-service I ...
James Koh's user avatar
1 vote
1 answer
2k views

Where did my cloudbuild.yaml come from? And why does it error with a Dockerfile?

I am trying to configure cloud run to deploy continuously from Github. My repo uses a Dockerfile. This worked fine in one project, we will call project A, now I am trying to recreate this in another ...
Halo's user avatar
  • 11
2 votes
1 answer
2k views

Cloud Build -> Cloud Deploy -> Cloud Run?

I am trying to build a release-from-main pipeline using Google's "serverless" offerings, where when something gets merged into main on GitHub, it triggers a Cloud Build (which builds, ...
samkass's user avatar
  • 5,961
2 votes
1 answer
574 views

Revision '<SERVICE_NAME>-00037-hep' does not exist or is deleted. Update all traffic to route to currently available revisions

I was creating a past revision in Cloud Run and received the following error message. Error Message Revision '<SERVICE_NAME>-00037-hep' does not exist or is deleted. Update all traffic to route ...
Coichiro Aso's user avatar
0 votes
1 answer
339 views

COPY failed: file not found in build context or excluded by .dockerignore: stat requirements.txt: file does not exist ERROR

I am able to build my docker image and run it locally. But when I am trying to deploy same docker image on cloud run its getting failed during code build and giving below error. Step 9/11 : COPY ...
iamabhaykmr's user avatar
  • 2,031
1 vote
1 answer
1k views

running npx prisma migrate inside cloud build using cloud sql and cloud Run (MySql)

I have a remix run application and am using a cloud sql database with a public IP and Prisma as an ORM. I'm also using Cloud Run to host my application and cloud build for the build process. The ...
James Daly's user avatar
  • 1,416
0 votes
1 answer
757 views

How to pass env variables and arguments while building cloud build docker images?

I am trying to learn cloudbuild and starting with a simple project where,when I commit to a branch of a github, a docker container is build,which copies a bash script file and print its content. I ...
Amarjeet Kushwaha's user avatar
0 votes
0 answers
651 views

Using Cloud Build and Cloud Run to do complex blue green deployments with gradual rollouts/immediate rollbacks on alerts

I've seen that blue-green deployments are possible using gcloud run services update-traffic and tagged revisions, and you can set the traffic percentage that a given revision has through that same ...
Brian K's user avatar
  • 751
0 votes
1 answer
638 views

Continuously deploy ASP.NET WebAPI from GitHub to Google Cloud Run

I need some help getting this to work. I've got it to the point where my container is built, but Cloud Run says the service isn't listening on the specified port. Updated: 6/28/2023 Changed project ...
André Engelbrecht's user avatar
0 votes
1 answer
65 views

Google Cloud Run

I recently started having problems deploying new revisions to Google Cloud Run. I'm following the same old routine for deployment I have used for a couple years. When I am in the gcloud cli, it tries ...
AgedMeadow's user avatar
0 votes
2 answers
1k views

RuntimeError with Microsoft's Text-to-Speech on Google Cloud Run

I am experiencing an issue with running Microsoft's text-to-speech on Google Cloud Run. The problem arose suddenly last night and I've been getting the following error: Traceback (most recent call ...
Nori's user avatar
  • 3,032
0 votes
0 answers
1k views

Best way to add environment variables to an Angular app during Google Build?

I am new to Angular and deployment in general. I use Google Build and Google Run to build and deploy an Angular app. I've set up a trigger for continuous development with a Cloud Build configuration ...
MariaJ's user avatar
  • 11
0 votes
2 answers
278 views

How to use an image deployed on cloud run for kubernetes deployment

I want to deploy an image from cloud run to kubernetes cluster. I have successfully built the docker image in cloudbuild.yaml file. Now the challenge is how to use the image in deploy.yaml The task ...
Salad.Guyo's user avatar
  • 3,445
2 votes
0 answers
244 views

How do I pass args to a python program using Cloud Run deploy with CloudBuild and Uvicorn?

I have a cloud run service which I deploy using Cloudbuild and uvicorn: CMD exec uvicorn src.api:app --host 0.0.0.0 --port $PORT I deploy with gcloud run deploy ... This works fine. Now I want to ...
schoon's user avatar
  • 3,373
0 votes
0 answers
133 views

What is the safest way to use API keys in Vue and GC run?

I have a Vue 3 project that needs to connect to an API. I need to use a private API key in my Vue project. Locally I use environment variables. I'm hosting my Vue project on Google Cloud Run. What's ...
jennie788's user avatar
  • 456
0 votes
1 answer
520 views

Use Google Cloud Run Environment variables in Vue 3

How can I access environment variables on Google Cloud Run at runtime in my Vue 3 project? In my cloudbuild, I add environment variables with this line: "--set-env-vars=TEST=tested" I can ...
jennie788's user avatar
  • 456
0 votes
0 answers
625 views

How to: Spring Boot + Gradle + Jib+ Cloud Run + Cloud Build

Anyone know of any examples of deploying a Spring Boot app using Spring Boot + Gradle + Jib + cloudbuild.yaml? I haven't found any so far. The GCP docs provide only a half-baked Maven build example (...
user avatar
0 votes
0 answers
111 views

How to use build arg to pass PUBLIC_API_URL while deploying NextJS web application using google cloud run?

I added PUBLIC_API_URL on my dockerfile and also on Environment variable on cloud run while setting up the service. But the PUBLIC_API_URL passed on build is not passing and the api url is missing in ...
mikiyasegaye's user avatar
0 votes
0 answers
206 views

GCP Cloudbuild Slack bot shared across multiple projects

Ive been able to create a slackbot, create a service account, pub/sub and sent notification via CloudRun calling a yaml and json config on a storage bucket, all at project level much like what is done ...
Kravitz's user avatar
  • 2,869
1 vote
2 answers
3k views

How to use GCP Cloud Build caching when deploying to Cloud Run

GCP Cloud Build can use cached image to speed up builds. I'm currently deploying to a Cloud Run service with gcloud run deploy zero2prod --source=., and noticed that Cloud Build under the hood doesn't ...
galah92's user avatar
  • 4,001
1 vote
1 answer
3k views

Getting error "Already have image (with digest): gcr.io/cloud-builders/docker" while trying Gitlab CICD

I am trying to use Gitlab CI/CD with Cloud Build and Cloud Run to deploy a Flask application. I am getting an error starting build "Edited" FETCHSOURCE Fetching storage object: gs://Edited Copying ...
sandepp's user avatar
  • 532
0 votes
1 answer
761 views

Gcloud, Cloud build: Update all cloud run services with new image at once

I have a Cloud Build trigger that push an image to container registry when a new commit is pushed on master branch. When this occurs, I would like to update all my cloud run jobs with newly created ...
Paul Serre's user avatar
2 votes
1 answer
606 views

How to deploy apps to cloud run using buildpack as cloudbuild trigger configuration?

I'm trying to deploy python apps on cloud run & i want to use buildpacks as cloud build trigger configuration. I created cloud build trigger and when i run it the image was created succesfully on ...
Alphafst's user avatar
1 vote
2 answers
1k views

how to specify default cloud run revision url in the cloud build yaml file

I have a GCP project where I continuously deploy changes (PRs) made to a GitHub repository to a cloud-run service using cloud build triggers the way i set it up at first is that i use GCP GUI this ...
Mustapha Khial's user avatar