google-cloud-build

How the triggers are added to Queue in google cloud build?

爱⌒轻易说出口 提交于 2020-08-10 23:53:25
问题 Build trigger should wait untill the previous trigger for a same repos finishes its execution. If i push twice to the repo, trigger executed twice at same time. I don't want this to be happen. How to make the cloud trigger to wait for the previous trigger job? Thanks in advance! 回答1: You would have to implement this configuration and logic. It would have to evaluate if the build has been triggered and running and then wait for it to finish. Maybe something can be done in order to check with

Is this the correct way to write if..else statement in cloudbuild.yaml file?

戏子无情 提交于 2020-07-09 11:50:44
问题 I am trying to deploy a cloud function using cloudbuild.yaml. It works fine if I don't use any conditional statement. I am facing an error when I execute my cloudbuild.yaml file with if conditional statement. What is the correct way to write it. Below is my code: steps: - name: 'gcr.io/cloud-builders/gcloud' id: deploy args: - '-c' - 'if [ $BRANCH_NAME != "xoxoxoxox" ] then [ 'functions', 'deploy', 'groups', '--region=us-central1', '--source=.', '--trigger-http', '--runtime=nodejs8', '--entry

How can I specify a region for the Cloud Storage buckets used by Cloud Build for a Cloud Run deployment?

 ̄綄美尐妖づ 提交于 2020-07-08 05:49:48
问题 When deploying a docker container image to Cloud Run, I can choose a region, which is fine. Cloud Run delegates the build to Cloud Build, which apparently creates two buckets to make this happen. The unexpected behavior is that buckets aren't created in the region of the Cloud Run deployment, and instead default to multi-region US. How do I specify the region as "us-east1" so the cost of storage is absorbed by the "always free" tier? (Apparently US multi-region storage buckets store data in

How can I specify a region for the Cloud Storage buckets used by Cloud Build for a Cloud Run deployment?

点点圈 提交于 2020-07-08 05:48:47
问题 When deploying a docker container image to Cloud Run, I can choose a region, which is fine. Cloud Run delegates the build to Cloud Build, which apparently creates two buckets to make this happen. The unexpected behavior is that buckets aren't created in the region of the Cloud Run deployment, and instead default to multi-region US. How do I specify the region as "us-east1" so the cost of storage is absorbed by the "always free" tier? (Apparently US multi-region storage buckets store data in

quick start in google cloud build

ぐ巨炮叔叔 提交于 2020-06-29 03:58:46
问题 I ran the quick start https://cloud.google.com/cloud-build/docs/quickstart-build and in the section "View the build details", I don't see the output of the quickstart.sh file anywhere. Where is the logs from actually running the quickstart.sh file? Without any output from quickstart.sh, I am unsure how to log what is going on in docker so I can fix broken builds that build in docker. 回答1: In this official tutorial, a docker container is built via Cloud Build, with only one executable bash

How to google oauth to an api? My example is not working

五迷三道 提交于 2020-06-29 03:46:45
问题 I am trying to do this article for google cloud build https://cloud.google.com/endpoints/docs/openapi/service-account-authentication I am guessing to use the service account email I generated the key from in that example AND for Audient, I put "" (which is probably the reason it's not working?). I have no idea and can't find what in the world to put for audience. In addition to code below, I tried setting audience to 'https://cloudbuild.googleapis.com' which also did not work My code is the

Why can't I override the timeout on my Google Cloud Build?

狂风中的少年 提交于 2020-06-27 18:42:28
问题 I am attempting to setup a CI Pipeline using Google Cloud Build. I am attempting to deploy a MeteorJS app which has a lengthy build time - the default build timeout for GCB is 10 minutes and it was recommended here that I increase the timeout. I have setup my cloudbuild.yaml file with the timeout option increased to 20 minutes: steps: - name: 'gcr.io/cloud-builders/gcloud' args: ['app', 'deploy'] timeout: 1200s I have a Trigger setup in GCB connected to a Bitbucket Repo and when I push a

Deploy individual services from a monorepo using github actions

微笑、不失礼 提交于 2020-06-27 08:37:22
问题 I have around 10 individual micro-services which are mostly cloud functions for various data processing jobs, which all live in a single github repository. The goal is to trigger the selective deployment of these service to Google Cloud Functions, on push to a branch - when an individual function has been updated. I must avoid the situation in which update of a single service causes the deployment of all the cloud functions. My current repository structure: /repo --/service_A ----/function --

How to run a Google Cloud Build trigger via cli / rest api / cloud functions?

依然范特西╮ 提交于 2020-06-24 09:23:10
问题 Is there such an option? My use case would be running a trigger for a production build (deploys to production). Ideally, that trigger doesn't need to listen to any change since it is invoked manually via chatbot. I saw this video CI/CD for Hybrid and Multi-Cloud Customers (Cloud Next '18) announcing there's an API trigger support, I'm not sure if that's what I need. 回答1: I did same thing few days ago. You can submit your builds using gcloud and rest api gcloud: gcloud builds submit --no

Google Cloud build conditional step

落花浮王杯 提交于 2020-06-23 03:14:52
问题 This is my cloud build file substitutions: _CLOUDSDK_COMPUTE_ZONE: us-central1-a _CLOUDSDK_CONTAINER_CLUSTER: $_CLOUDSDK_CONTAINER_CLUSTER steps: - name: gcr.io/$PROJECT_ID/sonar-scanner:latest args: - '-Dsonar.host.url=https://sonar.test.io' - '-Dsonar.login=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' - '-Dsonar.projectKey=test-service' - '-Dsonar.sources=.' - id: 'build test-service image' name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/$REPO_NAME/$BRANCH_NAME:$SHORT