| substitutions: | |
| _BUILD_TYPE: official | |
| _TAG_NAME: ${SHORT_SHA}-${BUILD_ID} | |
| _BUILD_TOOLS_CACHE: 'https://storage.googleapis.com/cos-infra-prod_cloudbuild/cos-tools-cache' | |
| steps: | |
| - name: 'gcr.io/cloud-builders/docker' | |
| entrypoint: 'bash' | |
| args: | |
| - '-c' | |
| - | | |
| cat <<EOF | docker build -t bazel - | |
| FROM gcr.io/cloud-builders/bazel:8.3.1 | |
| RUN apt-get update && apt-get install -y mtools dosfstools | |
| EOF | |
| - name: 'bazel' | |
| args: [ 'test', '--test_output=all', '--remote_cache=${_BUILD_TOOLS_CACHE}', '--google_default_credentials', '--spawn_strategy=standalone','--','...','-//src/pkg/tools/...' ] | |
| - name: 'golang' | |
| entrypoint: 'bash' | |
| args: [ './run_unit_tests.sh' ] | |
| - name: 'gcr.io/cloud-builders/gcloud' | |
| entrypoint: 'bash' | |
| env: | |
| - 'TAG_NAME=${_TAG_NAME}' | |
| - 'OUTPUT_PROJECT=${_OUTPUT_PROJECT}' | |
| - 'BUILD_TYPE=${_BUILD_TYPE}' | |
| args: [ './run_builds.sh', '-p', '$PROJECT_ID', '-m', 'publish'] | |
| # Run cos-customizer integration tests | |
| - name: 'gcr.io/cloud-builders/gcloud' | |
| entrypoint: 'bash' | |
| args: [ './run_builds.sh', '-p', '$PROJECT_ID', '-m', 'test'] | |
| timeout: 14400s |