forked from kubernetes/autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
60 lines (53 loc) · 1.33 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
options:
machineType: E2_HIGHCPU_32
timeout: 10800s
substitutions:
{ "_TAG": "dev" }
steps:
- name: gcr.io/cloud-builders/git
id: git-clone
entrypoint: bash
args:
- "-c"
- |
set -ex
mkdir -p /workspace/src/k8s.io
cd /workspace/src/k8s.io
git clone https://github.com/kubernetes/autoscaler.git
- name: gcr.io/cloud-builders/docker
id: build-build-container
entrypoint: bash
dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler"
args:
- "-c"
- |
set -e
docker build -t autoscaling-builder ../builder
- name: autoscaling-builder
id: run-tests
entrypoint: godep
dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler"
env:
- "GOPATH=/workspace/"
args: ["go", "test", "./..."]
- name: autoscaling-builder
id: run-build
entrypoint: godep
dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler"
env:
- "GOPATH=/workspace/"
- "GOOS=linux"
args: ["go", "build", "-o", "cluster-autoscaler"]
waitFor: build-build-container
- name: gcr.io/cloud-builders/docker
id: build-container
entrypoint: bash
dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler"
args:
- "-c"
- |
set -e
docker build -t gcr.io/k8s-image-staging/cluster-autoscaler:${_TAG} .
waitFor: ["run-tests", "run-build"]
images:
- "gcr.io/k8s-image-staging/cluster-autoscaler:${_TAG}"