Category : google-cloud-build

Within my code, I am attempting to gather the Application Default Credentials from the associated service account in Cloud Build: from google.auth import default credentials, project_id = default() This works fine in my local space because I have set the environment variable GOOGLE_APPLICATION_CREDENTIALS appropriately. However, when this line is executed (via a test step in ..

Read more

I have a Cloud Build which gets triggered when a new commit is made to our Github repo, which is being mirrored in a Google Source Repo. Cloudbuild YAML file is given as below: – name: ubuntu id: Initialization args: [‘bash’, ‘-c’, "echo ‘$COMMIT_SHA’ > REVISION.txt"] – name: gcr.io/cloud-builders/gsutil id: Deployment args: [‘rsync’, ‘-r’, ‘-x’, ..

Read more

My yaml in my git repo looks like this: steps: – name: "docker.io/library/python:3.6" args: ["pip", "install", "-t", "/workspace/lib", "-r", "requirements.txt"] steps: – name: python entrypoint: python args: ["-m", "pytest", "–junitxml=${SHORT_SHA}_test_log.xml"] The build fails with this docker.io/library/python:latest /usr/local/bin/python: No module named pytest ERROR ERROR: build step 0 "python" failed: step exited with non-zero status: 1 My ..

Read more