google-cloud-build

Google Cloud Build - View logs permissions

雨燕双飞 提交于 2020-03-17 11:13:15
问题 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 Viewer, Stackdriver Debugger Agent, Stackdriver Debugger User, Cloud Trace Admin, Logging Admin, Private Logs Viewer, Logs Viewer, Monitoring Admin 回答1: Google Cloud enterprise support confirmed to me that the only role that currently grants this is

Google Cloud Build - View logs permissions

Deadly 提交于 2020-03-17 11:05:39
问题 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 Viewer, Stackdriver Debugger Agent, Stackdriver Debugger User, Cloud Trace Admin, Logging Admin, Private Logs Viewer, Logs Viewer, Monitoring Admin 回答1: Google Cloud enterprise support confirmed to me that the only role that currently grants this is

Firebase deploy functions with Sharp library fails in Google Cloud Build

天涯浪子 提交于 2020-03-03 12:24:59
问题 After migrating to Google Cloud Build from Bitbucket Pipelines the Firebase deployment is failing. The setup was deploying successfully both on Bitbucket Pipelines and locally. No further explanation is given other than error below. I have comment parts of the code to to realize that "const sharp = require('sharp')" was one command that was making the build to fail. But there is no apparent reason why "firebase deploy" fails with "require('sharp')" and I have to way to tackle this. Firebase

Firebase deploy functions with Sharp library fails in Google Cloud Build

独自空忆成欢 提交于 2020-03-03 12:24:29
问题 After migrating to Google Cloud Build from Bitbucket Pipelines the Firebase deployment is failing. The setup was deploying successfully both on Bitbucket Pipelines and locally. No further explanation is given other than error below. I have comment parts of the code to to realize that "const sharp = require('sharp')" was one command that was making the build to fail. But there is no apparent reason why "firebase deploy" fails with "require('sharp')" and I have to way to tackle this. Firebase

How to specify secretEnv to cloudbuild.yaml via gcloud cli args or environment variables

ⅰ亾dé卋堺 提交于 2020-03-03 06:58:46
问题 If I follow the cloud build document, I have to specify encrypted secret on cloudbuild.yaml. secrets: - kmsKeyName: projects/[PROJECT-ID]/locations/global/keyRings/[KEYRING-NAME]/cryptoKeys/[KEY-NAME] secretEnv: MY_SECRET: <base64-encoded encrypted secret> Even if it is encrypted, I don't commit secret value at code. Please tell me another way. ex. via args from gcloud builds submit command or environment variables,...etc 回答1: You can use Google Secret Manager instead. We're still updating

Cloud Build Bazel Error: “kubectl toolchain was not properly configured so apply cannot be executed”

a 夏天 提交于 2020-02-05 05:50:07
问题 I am trying to use rules_k8s for Bazel to deploy to my Kubernetes cluster. Thus I have this cloudbuild.yaml file, which is executed by Google Cloud Build: steps: - name: gcr.io/cloud-builders/bazel args: ['run', '//:kubernetes.apply'] ( //:kubernetes is just a k8s_objects) On my local machine running bazel run //:kubernetes.apply works fine, but although the Google Cloud Build succeeds, it logs those errors. So the configuration is not applied to my Kubernetes cluster: Target //:kubernetes

Cloud build permission denied when deploy to cloud run with “--set-sql-instance” argument

强颜欢笑 提交于 2020-02-04 08:48:17
问题 I'm trying to configure cloud build triggers which build maven springboot project and then deploy to cloud runs. I run into a problem where it works when i don't specify the cloud sql instance to be connected with, but when I add "--set-cloudsql-instances", "${_DATABASE_CONNECTION_NAME}" as one of the args, it throws error on cloud build as follows: Step #1: ERROR: (gcloud.beta.run.deploy) PERMISSION_DENIED: The caller does not have permission Finished Step #1 ERROR ERROR: build step 1 "gcr

Make a curl request in Cloud Build CI/CD pipeline

别等时光非礼了梦想. 提交于 2020-01-25 08:52:05
问题 I have a server where our test cases run for all API, which is on the compute engine of GCP. How can I connect it from cloud build CI/CD pipeline so that the CI/CD stage passes only on 200 response status code from the server? GCP says to create a custom build step (here). Docs are not very clear 回答1: You have 2 solutions. You can effectively create a custom step. Build a container, finish it by an ENTRYPOINT which will be invoked in the Cloud Build pipeline You can perform a curl call inside

Deploying Google Cloud function from a Google Build

谁说胖子不能爱 提交于 2020-01-24 19:20:07
问题 When attempting to deploy a simple function, I am running into a 403 error. Here is my full yaml: steps: # Install Dependencies - name: 'python' id: Pip install args: ['pip3', 'install', '-r', 'requirements.txt', '--user'] # Run Tests - name: 'python' args: ['python3', '-m', 'pytest', 'functions/folder_a/test/'] # Deploy Cloud Functions - name: 'gcr.io/cloud-builders/gcloud' id: 'helloFunction' args: ['functions', 'deploy', 'hello', '--source' , 'functions/folder_a/main.py', '--runtime' ,

Give access to a google storage bucket to Google Build while building a Docker image

不打扰是莪最后的温柔 提交于 2020-01-24 15:32:27
问题 I am new to google cloud services and I am trying to set up an automatic build of my production requiring to download a heavy file. I would like to download a file from a dedicated Google Storage bucket inside the Docker build process. To do so, I have added the following line to my Dockerfile : RUN curl https://storage.cloud.google.com/[bucketname]/[filename] -o [filename] Since files from this bucket shouldn't be publicly accessible, I disabled object level permission and added to the