Skip to content

Commit

Permalink
Switch from Travis to Google Cloud Build (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristonianJones authored Dec 11, 2020
1 parent 3ea8bd3 commit 4c3317a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 38 deletions.
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Common Expression Language

[![Build Status](https://travis-ci.org/google/cel-go.svg?branch=master)](https://travis-ci.org/google/cel-go) [![Go Report Card](https://goreportcard.com/badge/github.com/google/cel-go)](https://goreportcard.com/report/github.com/google/cel-go)
[![Go Report Card](https://goreportcard.com/badge/github.com/google/cel-go)](https://goreportcard.com/report/github.com/google/cel-go)
[![GoDoc](https://godoc.org/github.com/google/cel-go?status.svg)][6]

The Common Expression Language (CEL) is a non-Turing complete language designed
Expand Down
50 changes: 29 additions & 21 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
# 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/']
# - 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/']
- name: 'gcr.io/cel-analysis/bazel:3.0.0'
entrypoint: bazel
args: ['test', '--test_output=errors', '...']
id: bazel-test
waitFor: ['-']
timeout: 10m
options:
machineType: 'N1_HIGHCPU_8'

0 comments on commit 4c3317a

Please sign in to comment.