google-cloud-build

Google Cloud Build doesn't substitute values in secrets section of cloudbuild.yaml

≯℡__Kan透↙ 提交于 2019-12-06 15:04:32
I'm trying to create a Cloud Build trigger where secret environment variables are encrypted with cloud KMS and stored as a substitution variable in Cloud Build. This way my cloud build yaml is fairly generic and the same across all environments we're deploying to. This cloud build yaml works fine: steps: - name: 'ubuntu' entrypoint: 'bash' args: ['-c', 'echo "$$APP_NAME HAS A VALUE $$HELLO_WORLD"'] env: - 'APP_NAME=${_APP_NAME}' secretEnv: - 'HELLO_WORLD' secrets: - kmsKeyName: 'projects/my-first-cicd-project/locations/europe-west1/keyRings/keyring-dev/cryptoKeys/key-backend' secretEnv: HELLO

Why does a git push on any Project trigger a build in Google Cloud Build (GitHub Apps)?

余生长醉 提交于 2019-12-06 11:06:03
问题 I want to enable the Google Cloud Build Github App in several Github projects. So on the Google Cloud Build Github App, I click on grant this app access to your GitHub account Then on the following screen, I install Google Cloud Build on All repositories . Then I'm redirecting to a couple of Google Authorization screens. Then I endup on the Google following screen, where I select an existing Google project-id then accept the consent screen. The issue is: a git push on any of my Github repo

Can Google Cloud Build be triggered by new Docker image in Container Registry?

江枫思渺然 提交于 2019-12-05 21:36:09
I'm setting up a CI/CD using Google's cloud tools, and was expecting to have a trigger condition "when new image is uploaded to Container Registry". The use case is separating deployment from source (repo). Source would push Docker images and deployment would deploy them to a test stage. But Cloud Build only provides me a trigger choice between three source repos. link What would you use for test, QA and production deployment of Docker images, in a GKE context? Meanwhile, there is a solution but it's a lillte cumbersome. As most of you probably know, GCR stores its images into a Bucket, it is

Why does a git push on any Project trigger a build in Google Cloud Build (GitHub Apps)?

匆匆过客 提交于 2019-12-04 15:25:18
I want to enable the Google Cloud Build Github App in several Github projects. So on the Google Cloud Build Github App, I click on grant this app access to your GitHub account Then on the following screen, I install Google Cloud Build on All repositories . Then I'm redirecting to a couple of Google Authorization screens. Then I endup on the Google following screen, where I select an existing Google project-id then accept the consent screen. The issue is: a git push on any of my Github repo triggers a build in this google project-id (and not on his related Google project-id) Of course I want a

Communicate between two containers in Google cloud build

♀尐吖头ヾ 提交于 2019-12-04 11:35:27
问题 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 communicate using names. But its failing. If I create my own docker bridge netwok then they communicating. I want to know why cloudbuild network is not working as expected. Please let me know if you know any other ways to establish communication

GitHub Cloud Build Integration with multiple cloudbuild.yamls in monorepo

蹲街弑〆低调 提交于 2019-12-04 10:29:58
问题 GitHub's Google Cloud Build integration does not detect a cloudbuild.yaml or Dockerfile if it is not in the root of the repository. When using a monorepo that contains multiple cloudbuild.yamls , how can GitHub's Google Cloud Build integration be configured to detect the correct cloudbuild.yaml ? File paths: services/api/cloudbuild.yaml services/nginx/cloudbuild.yaml services/websocket/cloudbuild.yaml Cloud Build integration output: 回答1: You can do this by adding a cloudbuild.yaml in the root

How do I set an environment or substitution variable via a step in Google Cloud Build?

吃可爱长大的小学妹 提交于 2019-12-03 12:25:37
Basically, when using Google Cloud Build, how do I read a value that was written in an earlier build step in subsequent steps? Specifically, I'd like to make a custom image tag that's based on a combination of the timestamp and $SHORT_SHA. Something like the below. Though, it doesn't work, as docker complains about "export", and, even if that worked, it likely will be a different env: # Setting tag in a variable: - name: 'ubuntu' args: ['export', '_BUILD_TAG=`date', '-u', '+%Y%m%dT%H%M%S_$SHORT_SHA`'] Then, in a later step: # Using tag from the variable: - name: gcr.io/cloud-builders/docker

Communicate between two containers in Google cloud build

梦想的初衷 提交于 2019-12-03 07:13:05
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 communicate using names. But its failing. If I create my own docker bridge netwok then they communicating. I want to know why cloudbuild network is not working as expected. Please let me know if you know any other ways to establish communication between step containers. cloudbuild.yaml steps: - name: 'gcr.io/cloud-builders/docker' id: Web server args

Google Cloud Build deploy to GKE Private Cluster

自闭症网瘾萝莉.ら 提交于 2019-11-30 12:44:31
I'm running a Google Kubernetes Engine with the "private-cluster" option. I've also defined "authorized Master Network" to be able to remotely access the environment - this works just fine. Now I want to setup some kind of CI/CD pipeline using Google Cloud Build - after successfully building a new docker image, this new image should be automatically deployed to GKE. When I first fired of the new pipeline, the deployment to GKE failed - the error message was something like: "Unable to connect to the server: dial tcp xxx.xxx.xxx.xxx:443: i/o timeout". As I had the "authorized master networks"

Google Cloud Build deploy to GKE Private Cluster

前提是你 提交于 2019-11-29 13:43:05
问题 I'm running a Google Kubernetes Engine with the "private-cluster" option. I've also defined "authorized Master Network" to be able to remotely access the environment - this works just fine. Now I want to setup some kind of CI/CD pipeline using Google Cloud Build - after successfully building a new docker image, this new image should be automatically deployed to GKE. When I first fired off the new pipeline, the deployment to GKE failed - the error message was something like: "Unable to connect