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

Commit

Permalink
Merge pull request #359 from GoogleCloudPlatform/refactor/terraform-b…
Browse files Browse the repository at this point in the history
…uild-resources

refactor: remove build steps from terraform module
  • Loading branch information
rogerthatdev committed Nov 15, 2022
2 parents 3b7a90a + dca3de6 commit bc49787
Show file tree
Hide file tree
Showing 31 changed files with 229 additions and 1,065 deletions.
10 changes: 0 additions & 10 deletions bq-workers/github-parser/cloudbuild.yaml
Expand Up @@ -25,16 +25,6 @@ steps:
waitFor: build
id: push

- # Deploy to Cloud Run
name: google/cloud-sdk
args: ['gcloud', 'run', 'deploy', 'github-parser',
'--image', 'gcr.io/$PROJECT_ID/github-parser:${_TAG}',
'--region', '${_REGION}',
'--platform', 'managed'
]
id: deploy
waitFor: push

images: [
'gcr.io/$PROJECT_ID/github-parser:${_TAG}'
]
33 changes: 33 additions & 0 deletions bq-workers/parsers.cloudbuild.yaml
@@ -0,0 +1,33 @@
# Copyright 2022 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:
- # Build parser image
name: gcr.io/cloud-builders/docker:latest
dir: ${_SERVICE}-parser
args: ['build',
'--tag=gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}', '.']
id: build

- # Push the container image to Container Registry
name: gcr.io/cloud-builders/docker
args: ['push', 'gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}']
waitFor: build
id: push

images: [
'gcr.io/$PROJECT_ID/${_SERVICE}-parser:${_TAG}'
]
substitutions:
_TAG: latest
2 changes: 1 addition & 1 deletion ci/e2e_terraform_module_test.cloudbuild.yaml
Expand Up @@ -53,7 +53,7 @@ steps:
bigquery_region="US"
event_handler_container_url="gcr.io/$_TARGET_PROJECT/event-handler:$SHORT_SHA"
dashboard_container_url="gcr.io/$_TARGET_PROJECT/dashboard:$SHORT_SHA"
parser_container_urls={"github":"gcr.io/$_TARGET_PROJECT/github-parser:$SHORT_SHA"}
github_parser_url="gcr.io/$_TARGET_PROJECT/github-parser:$SHORT_SHA"
}
EOF
waitFor: ['-']
Expand Down
11 changes: 0 additions & 11 deletions dashboard/cloudbuild.yaml
Expand Up @@ -24,18 +24,7 @@ steps:
args: ['push', 'gcr.io/$PROJECT_ID/fourkeys-grafana-dashboard:${_TAG}']
id: push

- # Deploy to Cloud Run
name: google/cloud-sdk
args: ['gcloud', 'run', 'deploy', 'fourkeys-grafana-dashboard',
'--image', 'gcr.io/$PROJECT_ID/fourkeys-grafana-dashboard:${_TAG}',
'--region', '${_REGION}',
'--platform', 'managed', '--port', '3000',
'--allow-unauthenticated'
]
id: deploy

# Read more about substitutions
# https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
substitutions:
_TAG: latest
_REGION: us-central1
14 changes: 2 additions & 12 deletions event-handler/cloudbuild.yaml
Expand Up @@ -24,18 +24,8 @@ steps:
waitFor: build
id: push

- # Deploy to Cloud Run
name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
args: ['gcloud', 'run', 'deploy', 'event-handler',
'--image', 'gcr.io/$PROJECT_ID/event-handler:${_TAG}',
'--region', '${_REGION}',
'--platform', 'managed',
'--allow-unauthenticated',
'--set-env-vars', 'PROJECT_NAME=$PROJECT_ID'
]
id: deploy
waitFor: push

images: [
'gcr.io/$PROJECT_ID/event-handler:${_TAG}'
]
substitutions:
_TAG: latest
304 changes: 82 additions & 222 deletions setup/README.md

Large diffs are not rendered by default.

109 changes: 0 additions & 109 deletions setup/READMEv2.md

This file was deleted.

43 changes: 0 additions & 43 deletions setup/dashboard/main.tf

This file was deleted.

3 changes: 0 additions & 3 deletions setup/dashboard/outputs.tf

This file was deleted.

19 changes: 0 additions & 19 deletions setup/dashboard/variables.tf

This file was deleted.

106 changes: 0 additions & 106 deletions setup/install.sh

This file was deleted.

0 comments on commit bc49787

Please sign in to comment.