Questions tagged [cloudbuild.yaml]

122 questions
2
votes
1 answer

Is there any alternative of JIB for golang project, which creates the docker image withour using dockerfile

I want to create the docker image of golang project using cloud build.yaml but without using dockerfile. Is there any tool available for golang which is alternative of JIB which creates the docker image without using dockerfile.
Sneha
  • 233
  • 2
  • 13
2
votes
1 answer

Cloud Build Error: generic::failed_precondition: no concurrent builds quota available to create builds

I am setting up a basic pipeline using Cloud Build, based on a Github trigger but running into the following error: Your build failed to run: generic::failed_precondition: generic::failed_precondition: no concurrent builds quota available to create…
2
votes
1 answer

How to SSH/SCP from Cloud Build thru IAP Tunnel?

I need to execute commands on my Compute Engine VM. We need an initial setup for the SQL and the plan is to use cloud build (will only be triggered once) for this; IAP is implemented and Firewall rule is already in place. (Allow TCP 22 from…
2
votes
1 answer

Permission error in GCP when creating a new compute instance but service account does have permissions

I am running a cloudbuild.yaml job in Google Cloud Platform that builds, pushes and tags a Docker Image and then it creates a Compute Engine instance to run that image via gcr.io/cloud-builders/gcloud.create-with-container. I also specify a service…
2
votes
1 answer

print current directory in bash command inside cloud build yaml

So i want to print the current working directory after reading the git tag of the commit example : /demo /test /prod So when a tag contains verxxx-demo the inline script will know that it needs to switch to the specific folder. My problem is now…
Andrei
  • 21
  • 2
2
votes
2 answers

How can I specify the app deployment to be in another folder using cloud build?

I have my app in a folder called client, how can I create a trigger that will specify the app deployment workflow to execute on that folder instead? My cloudbuild.yaml file is also in that folder and has this content: steps: - name:…
2
votes
2 answers

Why cloud build saying I am missing Required 'compute.instances.create' permission for my project?

I am trying to use the "create with container" method but getting the following error : ERROR: (gcloud.compute.instances.create-with-container) Could not fetch resource: Step #2: - Required 'compute.instances.create' permission…
2
votes
2 answers

Is there any way to pull image from docker hub and deploy to cloud run using cloudbuild.yaml

In documentation they say we can build and deploy container from cloud container registry to cloud run using cloudbuild.yaml file: steps: # Build the container image - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t',…
2
votes
1 answer

How to store docker images in Container Registry with different tags with a config file using Cloudbuild?

I want to store in the Google Container Registry the image with two different tags $BRANCH_NAME-$REVISION_ID and latest steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/myapp:$BRANCH_NAME-$REVISION_ID',…
2
votes
2 answers

How to pass parameters to docker run in google cloud build

I am trying to run a cypress pipeline using GCB, but it crashes when running inside docker. The fix for this issue, as described here, is to run the docker with --ipc=host. But looking in the documentation, I couldn't find how I pass parameters to…
2
votes
1 answer

Error on cloudbuild.yaml : (gcloud.builds.submit) interpreting cloudbuild.yaml as build config: 'list' object has no attribute 'items'

This is my cloudbuild.yaml file: steps: # BUILD IMAGE - name: "gcr.io/cloud-builders/docker" args: - "build" - "--build-arg" - "PROJECT_ID=$PROJECT_ID" - "--build-arg" - "SERVER_ENV=$_SERVER_ENV" -…
cbdeveloper
  • 27,898
  • 37
  • 155
  • 336
1
vote
1 answer

Difference between using and not using the 'images' attribute in .cloudyaml (for pushing to artifact registry)

I am reading the google cloud documentation and they have countless examples of using the docker build cloud-builder configuration. steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/myproject/myimage', '.'] images:…
1
vote
1 answer

Cloud Build does not push my Docker image to Artifact Registry with images field in cloudbuild.yaml

I have two GitHub repos (let's call them Repo1 and Repo2) in two Cloud Build triggers. Both have the same Service Account, GitHub account, GCP project, and both repos exist in Artifact Registry. Repo1's Docker image is pushed to the Artifact…
1
vote
1 answer

Google cloud Manifest unknown during deploy to Kubernetes cluster

I'm trying to deploy my code placed in bitbucket repo to Kubernetes clusters available in google cloud. I've created a trigger which react when I push new changes to bitbucket repo. I mean: Based on guidance:…
1
vote
1 answer

gcloud builds submit raises 403 error for `iam.serviceAccounts.get`

I have a Cloud Build I want to run from the command line. However when I try to run the build from my terminal, it raises this error: $ gcloud builds submit --region=asia-east1 --config cloudbuild.yaml Creating temporary tarball archive of 1 file(s)…
1
2
3
8 9