Skip to content

Commit

Permalink
ci: adding cloud build file
Browse files Browse the repository at this point in the history
  • Loading branch information
suztomo committed Mar 21, 2024
1 parent 13389a5 commit a59cec3
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .cloudbuild/samples_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
steps:
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: ls
args: [
'-alt',
]
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: curl
args: [
'--header',
'Metadata-Flavor: Google',
'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email'
]
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: pwd
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
entrypoint: printenv
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: printenv
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
entrypoint: gcloud
args: [
'config',
'list'
]
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
entrypoint: gcloud
args: [
'config',
'set',
'account',
'[email protected]'
]
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
entrypoint: gcloud
args: [
'config',
'list',
]
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
entrypoint: /bin/bash
args: [
'-c',
'mkdir /workspace/secret_manager; gcloud secrets versions access latest --project cloud-devrel-kokoro-resources --secret java-bigquery-samples-secrets > /workspace/secret_manager/java-bigquery-samples-secrets'
]
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: ls
args: [
'-alt',
'/workspace/secret_manager'
]
#- name: gcr.io/cloud-devrel-public-resources/java8
# entrypoint: bash
# args: [
# '.kokoro/populate-secrets.sh'
# ]
# env:
# - 'JOB_TYPE=samples'
# - 'GOOGLE_CLOUD_PROJECT=cloud-java-ci-sample'
# - 'SECRET_MANAGER_KEYS=java-docs-samples-service-account, java-bigquery-samples-secrets'
# - 'KOKORO_GFILE_DIR=/workspace'
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: bash
args: [
'.kokoro/build.sh'
]
env:
- 'JOB_TYPE=samples'
- 'GOOGLE_CLOUD_PROJECT=cloud-java-ci-sample'
- 'KOKORO_GFILE_DIR=/workspace'
- name: gcr.io/cloud-devrel-public-resources/java8
entrypoint: echo
args: [
'Sample job succeeded',
]
timeout: 3600s
options:
defaultLogsBucketBehavior: REGIONAL_USER_OWNED_BUCKET

0 comments on commit a59cec3

Please sign in to comment.