Skip to content

Commit

Permalink
Merge pull request #68 from YukiOnishi1129/feature/67-cloud-build
Browse files Browse the repository at this point in the history
Feature/67 cloud build
  • Loading branch information
YukiOnishi1129 authored May 7, 2024
2 parents 22dd0d2 + 50fd243 commit 3a6785d
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 1,996 deletions.
26 changes: 26 additions & 0 deletions batch-service/cloudbuild-trend-article-crawler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
substitutions:
_IMAGE: 'asia-northeast1-docker.pkg.dev/geek-picks-staging/trend-article-crawler/latest'
_JOB_NAME: 'trend-article-crawler'
_REGION: 'asia-northeast1'
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/$_IMAGE',' -f ', 'Dockerfile.trend-article-crawler', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$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'
- 'gcr.io/$PROJECT_ID/$_IMAGE'
- '--region'
- '$_REGION'
- '--execute-now'
images:
- gcr.io/$PROJECT_ID/$_IMAGE
Loading

0 comments on commit 3a6785d

Please sign in to comment.