Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit bc49787

Browse files
authored
Merge pull request #359 from GoogleCloudPlatform/refactor/terraform-build-resources
refactor: remove build steps from terraform module
2 parents 3b7a90a + dca3de6 commit bc49787

31 files changed

+229
-1065
lines changed

bq-workers/github-parser/cloudbuild.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ steps:
2525
waitFor: build
2626
id: push
2727

28-
- # Deploy to Cloud Run
29-
name: google/cloud-sdk
30-
args: ['gcloud', 'run', 'deploy', 'github-parser',
31-
'--image', 'gcr.io/$PROJECT_ID/github-parser:${_TAG}',
32-
'--region', '${_REGION}',
33-
'--platform', 'managed'
34-
]
35-
id: deploy
36-
waitFor: push
37-
3828
images: [
3929
'gcr.io/$PROJECT_ID/github-parser:${_TAG}'
4030
]

bq-workers/parsers.cloudbuild.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
steps:
16+
- # Build parser image
17+
name: gcr.io/cloud-builders/docker:latest
18+
dir: ${_SERVICE}-parser
19+
args: ['build',
20+
'--tag=gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}', '.']
21+
id: build
22+
23+
- # Push the container image to Container Registry
24+
name: gcr.io/cloud-builders/docker
25+
args: ['push', 'gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}']
26+
waitFor: build
27+
id: push
28+
29+
images: [
30+
'gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}'
31+
]
32+
substitutions:
33+
_TAG: latest

ci/e2e_terraform_module_test.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ steps:
5353
bigquery_region="US"
5454
event_handler_container_url="gcr.io/$_TARGET_PROJECT/event-handler:$SHORT_SHA"
5555
dashboard_container_url="gcr.io/$_TARGET_PROJECT/dashboard:$SHORT_SHA"
56-
parser_container_urls={"github":"gcr.io/$_TARGET_PROJECT/github-parser:$SHORT_SHA"}
56+
github_parser_url="gcr.io/$_TARGET_PROJECT/github-parser:$SHORT_SHA"
5757
}
5858
EOF
5959
waitFor: ['-']

dashboard/cloudbuild.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,7 @@ steps:
2424
args: ['push', 'gcr.io/$PROJECT_ID/fourkeys-grafana-dashboard:${_TAG}']
2525
id: push
2626

27-
- # Deploy to Cloud Run
28-
name: google/cloud-sdk
29-
args: ['gcloud', 'run', 'deploy', 'fourkeys-grafana-dashboard',
30-
'--image', 'gcr.io/$PROJECT_ID/fourkeys-grafana-dashboard:${_TAG}',
31-
'--region', '${_REGION}',
32-
'--platform', 'managed', '--port', '3000',
33-
'--allow-unauthenticated'
34-
]
35-
id: deploy
36-
3727
# Read more about substitutions
3828
# https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
3929
substitutions:
4030
_TAG: latest
41-
_REGION: us-central1

event-handler/cloudbuild.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,8 @@ steps:
2424
waitFor: build
2525
id: push
2626

27-
- # Deploy to Cloud Run
28-
name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
29-
args: ['gcloud', 'run', 'deploy', 'event-handler',
30-
'--image', 'gcr.io/$PROJECT_ID/event-handler:${_TAG}',
31-
'--region', '${_REGION}',
32-
'--platform', 'managed',
33-
'--allow-unauthenticated',
34-
'--set-env-vars', 'PROJECT_NAME=$PROJECT_ID'
35-
]
36-
id: deploy
37-
waitFor: push
38-
3927
images: [
4028
'gcr.io/$PROJECT_ID/event-handler:${_TAG}'
4129
]
30+
substitutions:
31+
_TAG: latest

setup/README.md

Lines changed: 82 additions & 222 deletions
Large diffs are not rendered by default.

setup/READMEv2.md

Lines changed: 0 additions & 109 deletions
This file was deleted.

setup/dashboard/main.tf

Lines changed: 0 additions & 43 deletions
This file was deleted.

setup/dashboard/outputs.tf

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup/dashboard/variables.tf

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)