| _TAG_NAME: ${SHORT_SHA}-${BUILD_ID} |
| _BUILD_TOOLS_CACHE: 'https://storage.googleapis.com/cos-infra-prod_cloudbuild/cos-tools-cache' |
| - name: 'gcr.io/cloud-builders/docker' |
| cat <<EOF | docker build -t bazel - |
| FROM gcr.io/cloud-builders/bazel:7.3.2 |
| RUN apt-get update && apt-get install -y mtools dosfstools |
| args: [ 'test', '--test_output=all', '--remote_cache=${_BUILD_TOOLS_CACHE}', '--google_default_credentials', '--spawn_strategy=standalone','--','...','-//src/pkg/tools/...' ] |
| args: [ './run_unit_tests.sh' ] |
| - name: 'gcr.io/cloud-builders/gcloud' |
| - 'TAG_NAME=${_TAG_NAME}' |
| - 'OUTPUT_PROJECT=${_OUTPUT_PROJECT}' |
| - 'BUILD_TYPE=${_BUILD_TYPE}' |
| args: [ './run_builds.sh', '-p', '$PROJECT_ID', '-m', 'publish'] |