summaryrefslogtreecommitdiffhomepage
path: root/cloudbuild/go.yaml
blob: 23dbf524e39d427566b88cccf800d456f1cd8004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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'