Skip to content

Commit 93f614d

Browse files
committed
Add build.yaml file for the image proxy
1 parent 966421b commit 93f614d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tool/build_image_proxy.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Configuration for Google Cloud Build
2+
#
3+
# Triggers in the project kicks off a cloud build task based on the
4+
# configuration in this file. Permissions granted to this task is configured
5+
# by granting permissions to the service account:
6+
# <project-id>@cloudbuild.gserviceaccount.com
7+
#
8+
# Reference: https://cloud.google.com/cloud-build/docs/build-config
9+
steps:
10+
- name: 'gcr.io/cloud-builders/docker'
11+
script: |
12+
#!/usr/bin/env bash
13+
set -x
14+
if [[ "$PROJECT_ID" != dartlang-pub ]]; then
15+
echo 'Only deploy from the dartlang-pub project'
16+
exit 1;
17+
fi
18+
if [[ "$TAG_NAME" != image_proxy-* ]]; then
19+
echo 'This script is only intended for use on image_proxy-<version> tags'
20+
exit 1;
21+
fi
22+
docker build -t us-central1-docker.pkg.dev/$PROJECT_ID/image-proxy-server:$TAG_NAME . --file pkg/image_proxy/Dockerfile
23+
env:
24+
- 'PROJECT_ID=$PROJECT_ID'
25+
- 'BRANCH_NAME=$BRANCH_NAME'
26+
- 'TAG_NAME=$TAG_NAME'
27+
images:
28+
- 'us-central1-docker.pkg.dev/$PROJECT_ID/image-proxy-server:$TAG_NAME'
29+
timeout: '5400s'

0 commit comments

Comments
 (0)