Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#12 from GoogleCloudPlatform/di…
Browse files Browse the repository at this point in the history
…nagraves-patch-1

Use docker push
  • Loading branch information
dinagraves authored May 25, 2021
2 parents 8a1c178 + 01c1b08 commit fce4c02
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions basic-config/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ steps:
'us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage',
'.']

# Docker Push
- name: 'gcr.io/cloud-builders/docker'
args: ['push', '-image',
'us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage']

# Entrypoint, timeout and environment variables
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
timeout: 240s
args: ['artifacts', 'docker', 'images', 'scan',
args: ['compute', 'instances',
'create-with-container', 'my-vm-name',
'--container-image',
'us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage']
env:
- 'CLOUDSDK_CORE_PROJECT=${PROJECT_ID}'

# Store image in Artifact Registry
images: ['us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage']
- 'CLOUDSDK_COMPUTE_REGION=us-central1'
- 'CLOUDSDK_COMPUTE_ZONE=us-central1-a'

0 comments on commit fce4c02

Please sign in to comment.