Skip to content

Commit

Permalink
production cloud build
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiOnishi1129 committed May 25, 2024
1 parent ae2d59c commit 79e3606
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
26 changes: 26 additions & 0 deletions batch-service/cloudbuild-article-company-crawler-production.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions batch-service/cloudbuild-trend-article-crawler-production.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 79e3606

Please sign in to comment.