Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions tool/build_image_proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Configuration for Google Cloud Build
#
# Triggers in the project kicks off a cloud build task based on the
# configuration in this file. Permissions granted to this task is configured
# by granting permissions to the service account:
# <project-id>@cloudbuild.gserviceaccount.com
#
# Reference: https://cloud.google.com/cloud-build/docs/build-config
steps:
- name: 'gcr.io/cloud-builders/docker'
script: |
#!/usr/bin/env bash
set -x
if [[ "$PROJECT_ID" != dartlang-pub ]]; then
echo 'Only deploy from the dartlang-pub project'
exit 1;
fi
if [[ "$TAG_NAME" != image_proxy-* ]]; then
echo 'This script is only intended for use on image_proxy-<version> tags'
exit 1;
fi
docker build -t us-central1-docker.pkg.dev/$PROJECT_ID/image-proxy-server:$TAG_NAME . --file pkg/image_proxy/Dockerfile
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'BRANCH_NAME=$BRANCH_NAME'
- 'TAG_NAME=$TAG_NAME'
images:
- 'us-central1-docker.pkg.dev/$PROJECT_ID/image-proxy-server:$TAG_NAME'
timeout: '5400s'