diff options
Diffstat (limited to 'cloudbuild/go.yaml')
-rw-r--r-- | cloudbuild/go.yaml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cloudbuild/go.yaml b/cloudbuild/go.yaml new file mode 100644 index 000000000..23dbf524e --- /dev/null +++ b/cloudbuild/go.yaml @@ -0,0 +1,20 @@ +steps: +- name: 'gcr.io/cloud-builders/git' + args: ['fetch', '--all', '--unshallow'] +- name: 'gcr.io/cloud-builders/bazel' + args: ['build', ':gopath'] +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', 'gcr.io/$PROJECT_ID/go-branch', '-f', 'cloudbuild/go.Dockerfile', '.'] +- name: 'gcr.io/$PROJECT_ID/go-branch' + args: ['tools/go_branch.sh'] +- name: 'gcr.io/cloud-builders/git' + args: ['checkout', 'go'] +- name: 'gcr.io/cloud-builders/git' + args: ['clean', '-f'] +- name: 'golang' + args: ['go', 'build', './...'] +- name: 'gcr.io/cloud-builders/git' + entrypoint: 'bash' + args: + - '-c' + - 'if [[ "$BRANCH_NAME" == "master" ]]; then git push origin go:go; fi' |