Questions tagged [cloudbuild.yaml]

122 questions
6
votes
1 answer

How do you specify a custom service.yaml for cloud run in a cloudbuild.yaml?

I have a docker container deployed on Googles Cloud Run service. It has a very basic cloudbuild.yaml file that triggers from a git push to main branch. I wish to automatically increase the ram of the cloud run machine from 512mb to 8gb. I know this…
5
votes
1 answer

Google Cloud Build does not use cache for some of the RUN executions

I have been using Google Cloud Build with cloudbuild.yaml and a Dockerfile. You can find the files below : cloudbuild.yaml steps: - name: 'gcr.io/cloud-builders/docker' entrypoint: 'bash' args: ['-c', 'docker pull…
5
votes
3 answers

How to build quarkus native image on google cloudbuild

Does anyone has an idea how to build quarkus native image on cloudbuild? I use following command to do so: - name: maven:3-jdk-11 entrypoint: mvn args: ["package", "-Dmaven.test.skip=true", "-Pnative",…
Ksz
  • 53
  • 1
  • 5
5
votes
1 answer

How to use Kaniko in cloudbuild.yaml?

I just learned that one can speed up the build process in Google Cloud build by using Kaniko cache. I looked at the docs and it provided a small example. However, I'm not sure how to apply it in my use case. I am basically pushing a Nuxt app into my…
5
votes
2 answers

Gcloud cloud build local component failing with error "Error loading config file: unknown field "availableSecrets" in cloudbuild.Build"

Greetings stackoverflow community! First time asker, long time user. I am testing out my cloudbuild.yaml file locally using Cloud Build Local component and Secret Manager and it is failing on "availableSecrets". Error message: Error loading config…
4
votes
2 answers

Cannot install private dependency from artifact registry inside docker build

I am trying to install a private python package that was uploaded to an artifact registry inside a docker container (to deploy it on cloudrun). I have sucessfully used that package in a cloud function in the past, so I am sure the package…
4
votes
1 answer

Terraform, weird patterns in the log [32m+ [0m

I am following this tutorial from the official GCP repo on how to deploy terraform from a cloud build: cloudbuils.yaml steps: - id: 'branch name' name: 'alpine' entrypoint: 'sh' args: - '-c' - | echo "***********************" …
Benjamin Breton
  • 1,388
  • 1
  • 13
  • 42
4
votes
0 answers

Is there a way to cache my own GCR image to avoid pulling it every build?

I have a build where this image is stored in my GCR and I want to reduce the time as it takes several minutes to pull each time. Is there a way to cache this image so each time it can be instantly taken from a cache? # Run tests - name:…
3
votes
2 answers

How to specify absolute path to Dockerfile on docker build

How can I specify -t and -f parameters on docker cloud build job. - name: 'gcr.io/cloud-builders/docker' entrypoint: 'bash' args: - '-c' - |- docker build --network=cloudbuild -f pipeline/components/testdocker/Dockerfile -t…
Lucas
  • 549
  • 1
  • 4
  • 16
3
votes
3 answers

Cloudbuild can't access Artifacts Registery when building cloud run docker container

I'm using a package from Artifacts Registery in my cloud run nodejs container. When I try to gcloud builds submit I get the following error: Step #1: npm ERR! 403 403 Forbidden - GET https://us-east4-npm.pkg.dev/.... Step #1: npm ERR! 403 In most…
3
votes
1 answer

Deploy Docker images to google cloud run with docker-compose

I'm trying to deploy an app from a docker-compose file with two images in it: an Angular app (frontend) and a very small nestjs app (backend). I'm using GCB, their triggers and a cloudbuild.json. This is its current state: { "steps": [ { …
3
votes
1 answer

gcloud beta command in build step in cloudbuild.yaml. Should I use entrypoint or args?

I'm trying to build and deploy a Docker image to Cloud Run. And I'd like to set min-instances=1 so I can avoid cold starts. I'm building and deploying it using Cloud Build through the gcloud CLI. So this is was my 1st attempt from the gcloud…
cbdeveloper
  • 27,898
  • 37
  • 155
  • 336
2
votes
0 answers

Getting git history in cloudbuild from github

I need to have the git history in cloudbuild to detect which apps in my nx monorepo had changes. My current approach to getting the history is the following: steps: - id: 'create github ssh configurations' name: 'gcr.io/cloud-builders/git' …
2
votes
1 answer

How to GCP Cloud Build + Java 17 + Gradle 7.6

Can't figure out how to use Cloud Build + Gradle + Java 17 to build a Java Jar file. I can't find any example cloudbuild.yaml that uses Gradle 7.6, which is required for my Gradle build. I'm not trying to build an image, just a jar file. The…
user8787347
2
votes
1 answer

how to make mypy step in cicd not fail?

I added a type check to my cloudbuild pipeline but the steps fails. how to make it pass even with errors detected by mypy ? or maybe set a threshold like in pylint with the option fail-under? The step looks like this: Check type hints - id:…
djohon
  • 705
  • 2
  • 10
  • 25
1
2 3
8 9