Skip to content

Commit

Permalink
Add Cloud Build deploy config (open-telemetry#50)
Browse files Browse the repository at this point in the history
* Add Cloud Build deploy config

* Add cloudbuild-deploy.yaml to ignore licenses check
  • Loading branch information
damemi authored Apr 29, 2024
1 parent 48fd060 commit 25a4701
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"internal/tools/",
"gcp-config-values.yml"
"gcp-config-values.yml",
"cloudbuild-deploy.yaml"
]
}
34 changes: 34 additions & 0 deletions cloudbuild-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

steps:
# set the project ID in the k8s manifest for service account/workload identity
- name: 'ubuntu'
id: Replace
script: |
#!/usr/bin/env bash
sed -i "s/%GCLOUD_PROJECT%/${PROJECT_ID}/g" ./kubernetes/opentelemetry-demo.yaml
# deploy the manifests to the otel-demo namespace in GKE
- name: 'gcr.io/cloud-builders/kubectl'
id: Deploy
args:
- 'apply'
- '-n'
- 'otel-demo'
- '-f'
- './kubernetes/opentelemetry-demo.yaml'
env:
- 'CLOUDSDK_COMPUTE_REGION=${LOCATION}'
- 'CLOUDSDK_CONTAINER_CLUSTER=${_GKE_CLUSTER}'

0 comments on commit 25a4701

Please sign in to comment.