-
Notifications
You must be signed in to change notification settings - Fork 14
/
cloudbuild.yaml
79 lines (70 loc) · 2.07 KB
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
steps:
- name: gcr.io/cloud-builders/gsutil
entrypoint: 'bash'
args: ['-c', 'mkdir -p /go/pkg && cd /go/pkg && gsutil cat gs://$PROJECT_ID-cache/solo-kit/solo-kit-mod.tar.gz | tar -xzf -']
id: 'untar-mod-cache'
dir: &dir '/workspace/solo-kit'
# prepare-workspace to set up the project so it can be built and tested
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.1'
args:
- "--repo-name"
- "$REPO_NAME"
- "--repo-sha"
- "$COMMIT_SHA"
- "--repo-output-dir"
- "."
env:
- 'GIT_SSH_CONFIG=FALSE'
id: 'prepare-workspace'
# download massive container in parallel
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.1'
entrypoint: 'bash'
dir: *dir
args: ['-c', 'ls']
waitFor: ['-']
# Installs go executables required by codegen tests
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.1'
args: ['update-all']
waitFor: ['prepare-workspace']
id: 'update-deps'
dir: *dir
# Set gcloud Kubeconfig
- name: gcr.io/cloud-builders/gcloud
args: ['config', 'set', 'compute/zone', 'us-central1-b']
id: 'gcloud-compute-zone'
dir: *dir
- name: gcr.io/cloud-builders/gcloud
args: ['container', 'clusters', 'get-credentials', 'solo-kit-test']
id: 'gcloud-solo-kit-test'
# check code gen for kubernetes custom resources
# this step passes if there is no generated diff, fails otherwise
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.1'
entrypoint: 'bash'
args: ['ci/check-code-gen.sh']
waitFor: ['update-deps']
dir: *dir
id: 'check-code-and-docs-gen'
# e2e-go-mod-ginkgo is produced from https://github.com/solo-io/cloud-builders/tree/master/e2e-go-mod-ginkgo
# sets up redis, consul, kubectl, go with required environment variables
# need to use the provided entrypoint
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.1'
dir: *dir
entrypoint: 'make'
args:
- 'test'
waitFor:
- 'check-code-and-docs-gen'
env:
- 'RUN_KUBE_TESTS=1'
- 'RUN_CONSUL_TESTS=1'
- 'RUN_VAULT_TESTS=1'
id: 'test'
timeout: 1500s
tags: ['solo-kit']
options:
machineType: 'N1_HIGHCPU_32'
env:
- 'TAGGED_VERSION=$TAG_NAME'
volumes:
- name: 'gopath'
path: '/go'