-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpresubmit.yaml
More file actions
23 lines (23 loc) · 878 Bytes
/
presubmit.yaml
File metadata and controls
23 lines (23 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Cloud Build YAML to run all presubmit tasks
# Using a machine with 8 CPUs to speed up the builds.
steps:
- name: docker
env:
- 'DOCKER_API_VERSION=1.41'
script: |
set -e
# Find all directories that contain a file named `Dockerfile`
# The colors-e2e directories are their own modules, so docker builds them using the directory
# as the build context (since their go.mod and go.sum files are within that directory).
# All other directories are part of one module.
for dir in $(find . -type d -exec test -e '{}'/Dockerfile \; -print); do
echo "BUILDING $dir"
if [[ "$dir" == "./colors-e2e/colors-be" ]] || \
[[ "$dir" == "./colors-e2e/colors-fd" ]]; then
docker build $dir
else
docker build . -f "$dir/Dockerfile"
fi
done
options:
machineType: 'E2_HIGHCPU_8'