From 79e3606f7c33d5256e1d68c542abaa5be67c27ea Mon Sep 17 00:00:00 2001 From: YukiOnishi <58220747+YukiOnishi1129@users.noreply.github.com> Date: Sat, 25 May 2024 22:51:56 +0900 Subject: [PATCH] production cloud build --- ...ld-article-company-crawler-production.yaml | 26 +++++++++++++++++++ ...e-site-and-summary-crawler-production.yaml | 26 +++++++++++++++++++ ...uild-trend-article-crawler-production.yaml | 26 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 batch-service/cloudbuild-article-company-crawler-production.yaml create mode 100644 batch-service/cloudbuild-article-site-and-summary-crawler-production.yaml create mode 100644 batch-service/cloudbuild-trend-article-crawler-production.yaml diff --git a/batch-service/cloudbuild-article-company-crawler-production.yaml b/batch-service/cloudbuild-article-company-crawler-production.yaml new file mode 100644 index 00000000..e3f8b645 --- /dev/null +++ b/batch-service/cloudbuild-article-company-crawler-production.yaml @@ -0,0 +1,26 @@ +substitutions: + _IMAGE: 'article-company-crawler/latest' + _JOB_NAME: 'article-company-crawler' + _REGION: 'us-west1' +steps: +# Build the container image +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE','-f', 'batch-service/Dockerfile.article-company-crawler', '.'] +# Push the container image to Container Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE'] +# Deploy container image to Cloud Run +# - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' +# entrypoint: gcloud +# args: +# - 'run' +# - 'jobs' +# - 'deploy' +# - '$_JOB_NAME' +# - '--image' +# - '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE' +# - '--region' +# - '$_REGION' +# # - '--execute-now' +images: +- $_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE \ No newline at end of file diff --git a/batch-service/cloudbuild-article-site-and-summary-crawler-production.yaml b/batch-service/cloudbuild-article-site-and-summary-crawler-production.yaml new file mode 100644 index 00000000..8221d1ff --- /dev/null +++ b/batch-service/cloudbuild-article-site-and-summary-crawler-production.yaml @@ -0,0 +1,26 @@ +substitutions: + _IMAGE: 'article-site-and-summary-crawler/latest' + _JOB_NAME: 'article-site-and-summary-crawler' + _REGION: 'us-west1' +steps: +# Build the container image +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE','-f', 'batch-service/Dockerfile.article-site-and-summary-crawler', '.'] +# Push the container image to Container Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE'] +# Deploy container image to Cloud Run +# - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' +# entrypoint: gcloud +# args: +# - 'run' +# - 'jobs' +# - 'deploy' +# - '$_JOB_NAME' +# - '--image' +# - '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE' +# - '--region' +# - '$_REGION' +# # - '--execute-now' +images: +- $_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE \ No newline at end of file diff --git a/batch-service/cloudbuild-trend-article-crawler-production.yaml b/batch-service/cloudbuild-trend-article-crawler-production.yaml new file mode 100644 index 00000000..b7eedc57 --- /dev/null +++ b/batch-service/cloudbuild-trend-article-crawler-production.yaml @@ -0,0 +1,26 @@ +substitutions: + _IMAGE: 'trend-article-crawler/latest' + _JOB_NAME: 'trend-article-crawler' + _REGION: 'us-west1' +steps: +# Build the container image +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE','-f', 'batch-service/Dockerfile.trend-article-crawler', '.'] +# Push the container image to Container Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE'] +# Deploy container image to Cloud Run +# - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' +# entrypoint: gcloud +# args: +# - 'run' +# - 'jobs' +# - 'deploy' +# - '$_JOB_NAME' +# - '--image' +# - '$_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE' +# - '--region' +# - '$_REGION' +# # - '--execute-now' +images: +- $_REGION-docker.pkg.dev/$PROJECT_ID/$_IMAGE \ No newline at end of file