-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docker build and cloud build config (#1175)
* Remove redundant steps from docker build * Fix cloud build config
- Loading branch information
Showing
3 changed files
with
7 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
# Builds the docker image of import executor, pushes it to artifact registry, | ||
# and creates a cloud run job using this images. | ||
# Builds the docker image of import executor and pushes it to artifact registry. | ||
# | ||
# Run it using: | ||
# gcloud builds submit --config=cloudbuild.yaml --substitutions=_DOCKER_IMAGE="us-docker.pkg.dev/datcom-ci/gcr.io/dc-import-executor:latest" . | ||
|
||
steps: | ||
# Install dependencies | ||
- name: python | ||
entrypoint: pip | ||
args: ["install", "-r", "requirements.txt", "--user"] | ||
|
||
# Docker Build | ||
- name: 'gcr.io/cloud-builders/docker' | ||
dir: 'import-automation/executor' | ||
args: ['build', '-t', '${_DOCKER_IMAGE}', '.'] | ||
|
||
# Docker push to Google Artifact Registry | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['push', '${_DOCKER_IMAGE}'] | ||
|
||
# Deploy to Cloud Run | ||
#- name: google/cloud-sdk | ||
# args: ['gcloud', 'run', 'jobs', 'deploy', '${_JOB_NAME}', | ||
# '--image=${_DOCKER_IMAGE}', '--region', '${_REGION}'] | ||
|
||
# Store images in Google Artifact Registry | ||
images: | ||
- ${_DOCKER_IMAGE} |