| # Used by Google Cloud Build to run cel-go conformance tests and generate necesary file structure for TestGrid dashboard in Google Cloud Storage |
| steps: |
| - name: 'ubuntu' |
| # writes start time and #PR to started.json |
| args: ['bash', 'conformance/start.sh', '$COMMIT_SHA'] |
| # Because testgrid uses monotonically increasing, numerical ids as folder names and GCB generates random ids, the timestamp |
| # at start is recorded and written to a file, then read at the end to ensure monotonically increasing numbers. |
| - name: 'ubuntu' |
| # stores timestamp in _DATE to use as build id |
| args: ['bash', '-c', 'date +%Y%m%d%H%M%S > _DATE' ] # Will create folder of format YYYYMMDDHHMMSS |
| - name: 'gcr.io/cloud-builders/gsutil' |
| # writes _DATE to GCS bucket so it can be used as GCS folder name |
| args: ['cp', '-r', '_DATE', 'gs://cel-conformance'] |
| - name: 'gcr.io/cloud-builders/bazel' |
| # run conformance tests with bazel |
| args: ['test', '--test_output=all', 'conformance/ct_dashboard'] |
| - name: 'ubuntu' |
| # creates necessary format and folder structure for TestGrid to parse |
| args: ['bash', 'conformance/zip.sh'] |
| - name: 'gcr.io/cloud-builders/gsutil' |
| entrypoint: sh |
| # deploys folder of test results (with build id as folder name) to GCS |
| args: ['-c', 'gsutil cp -r $(cat _DATE) gs://cel-conformance/test-logs/'] |