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
18
votes
2 answers

Google Cloud build conditional step

I have the following cloudbuild.yaml file: substitutions: _CLOUDSDK_COMPUTE_ZONE: us-central1-a _CLOUDSDK_CONTAINER_CLUSTER: $_CLOUDSDK_CONTAINER_CLUSTER steps: - name: gcr.io/$PROJECT_ID/sonar-scanner:latest args: -…
18
votes
2 answers

How can I save google cloud build step text output to file

I'm trying to use google cloud build. At one step, I need to get a list of all running compute instances. - name: gcr.io/cloud-builders/gcloud args: ['compute', 'instances', 'list'] and it works fine. Problem starts when I tried to save the…
Mahmoud Samy
  • 2,822
  • 7
  • 34
  • 78
18
votes
3 answers

Communicate between two containers in Google cloud build

I am running my CI/CD pipeline in Google cloud build. My app has web and wget containers. I am trying to reach web from wget Cloud build internally used cloudbuild bridge network while starting containers as steps. So I am expecting these steps to…
manikantanr
  • 574
  • 3
  • 13
17
votes
3 answers

Multiple commands in the same build step in Google Cloud Builder

I want to run our automated backend test suite on Google Cloud Builder environment. However, naturally, I bumped into the need to install various dependencies and prerequisites within the Cloud Builder so that our final test runner (php tests/run)…
Dzhuneyt
  • 8,437
  • 14
  • 64
  • 118
17
votes
4 answers

How can I grant the account permission to list enabled APIs?

During a build on Cloud Build, I get the following warning: Step #2: WARNING: Unable to verify that the Appengine Flexible API is enabled for project [xxxxx]. You may not have permission to list enabled services on this project. If it is not…
jub0bs
  • 60,866
  • 25
  • 183
  • 186
17
votes
5 answers

ERROR: (gcloud.beta.functions.deploy) ... message=[The caller does not have permission]

I am trying to deploy code from this repo: https://github.com/anishkny/puppeteer-on-cloud-functions in Google Cloud Build. My cloudbuild.yaml file contents are: steps: - name: 'gcr.io/cloud-builders/gcloud' args: ['beta', 'functions', 'deploy',…
anishkny
  • 421
  • 1
  • 3
  • 8
16
votes
3 answers

Error publishing source code from cloud build to a bucket using triggers

I´m trying to publish the html code from one cloud source repository to a public storage bucket in gcp through a cloud build trigger . However , I get the following error in the build each time I push to the master branch. generic::invalid_argument:…
16
votes
8 answers

GCP Cloud Function - ERROR fetching storage source during build/deploy

Running into problems building deploying functions. When trying to programmatically deploy the function I get the following output in builder logs (ERRORS). 2020-10-20T02:22:12.155866856Z starting build "1fc13f51-28b6-4052-9a79-d5d0bef9ed5c" I…
16
votes
6 answers

Why am I seeing this error: 'ERROR: (gcloud.run.deploy) PERMISSION_DENIED: The caller does not have permission' while deploying container?

Assume I have a cloudbuild.yaml file like the one below. Also assume that I can run and deploy the container in question manually when using gcloud for the separate functionalities (building and running). When deploying, the third step is resulting…
15
votes
4 answers

How to access a GCP Cloud Source Repository from another project?

I have project A and project B. I use a GCP Cloud Source Repository on project A as my 'origin' remote. I use Cloud Build with a trigger on changes to the 'develop' branch of the repo to trigger builds. As part of the build I deploy some stuff with…
ci_
  • 8,594
  • 10
  • 39
  • 63
15
votes
2 answers

Google Cloud Build - View logs permissions

I am the owner of a project and want to give Permissions to another user to view Logs of Google Cloud Build, but I can not figure out which Role / Permission this user needs. Roles I've unsuccessfully tried are: Cloud Build Editor, Cloud Build…
Lyubomir
  • 19,615
  • 6
  • 55
  • 69
15
votes
3 answers

How to prevent cloud build from running builds in parallel?

We are using cloud build for continuous deployment on GCP. When pushing commits to fast (e.g. on development) the triggered builds are running in parallel. Sometimes those interfere which one another. For example when two app engine deployments are…
Carsten Rietz
  • 461
  • 3
  • 13
14
votes
1 answer

GCP Cloud Build fails with permissions error even though correct role is granted

I setup a Cloud Build Trigger in my GCP project in order to deploy a Cloud Function from a Cloud Source Repository via a .yaml file. Everything seems to have been setup correctly and permissions granted according to the official documentation, but…
12
votes
0 answers

How do I get Google Cloud Build to properly substitute values when it responds to a GitHub trigger?

The Problem A GitHub trigger set up in Google Cloud Build doesn't actually substitute the configured values while running the Build (cloudbuild.yaml) This is the Google Cloud Build config cloudbuild.yaml steps: - name:…
11
votes
2 answers

Firebase deploy function Build failed: Build error details not available

I have several projects having the same issue. It was deploying fine just a day ago. Now the deployment will quit with an error: Build failed: Build error details not available. The logs from the GCP is shown below (replaced with project-name): { …
Shaun
  • 131
  • 5
1
2
3
94 95