|
| 1 | +# See https://cloud.google.com/cloud-build/docs/build-config |
| 2 | +timeout: 3600s |
1 | 3 | options:
|
2 |
| - machineType: E2_HIGHCPU_32 |
3 |
| -timeout: 10800s |
4 |
| - |
5 |
| -substitutions: |
6 |
| - { "_TAG": "dev" } |
7 |
| - |
| 4 | + # this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, |
| 5 | + # or any new substitutions added in the future. |
| 6 | + substitution_option: ALLOW_LOOSE |
8 | 7 | steps:
|
9 |
| -- name: gcr.io/cloud-builders/git |
10 |
| - id: git-clone |
11 |
| - entrypoint: bash |
12 |
| - args: |
13 |
| - - "-c" |
14 |
| - - | |
15 |
| - set -ex |
16 |
| - mkdir -p /workspace/src/k8s.io |
17 |
| - cd /workspace/src/k8s.io |
18 |
| - git clone https://github.com/kubernetes/autoscaler.git |
19 |
| -
|
20 |
| -- name: gcr.io/cloud-builders/docker |
21 |
| - id: build-build-container |
22 |
| - entrypoint: bash |
23 |
| - dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler" |
24 |
| - args: |
25 |
| - - "-c" |
26 |
| - - | |
27 |
| - set -e |
28 |
| - docker build -t autoscaling-builder ../builder |
29 |
| -
|
30 |
| -- name: autoscaling-builder |
31 |
| - id: run-tests |
32 |
| - entrypoint: godep |
33 |
| - dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler" |
34 |
| - env: |
35 |
| - - "GOPATH=/workspace/" |
36 |
| - args: ["go", "test", "./..."] |
37 |
| - |
38 |
| -- name: autoscaling-builder |
39 |
| - id: run-build |
40 |
| - entrypoint: godep |
41 |
| - dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler" |
42 |
| - env: |
43 |
| - - "GOPATH=/workspace/" |
44 |
| - - "GOOS=linux" |
45 |
| - args: ["go", "build", "-o", "cluster-autoscaler"] |
46 |
| - waitFor: build-build-container |
47 |
| - |
48 |
| -- name: gcr.io/cloud-builders/docker |
49 |
| - id: build-container |
50 |
| - entrypoint: bash |
51 |
| - dir: "/workspace/src/k8s.io/autoscaler/cluster-autoscaler" |
52 |
| - args: |
53 |
| - - "-c" |
54 |
| - - | |
55 |
| - set -e |
56 |
| - docker build -t gcr.io/k8s-image-staging/cluster-autoscaler:${_TAG} . |
57 |
| - waitFor: ["run-tests", "run-build"] |
58 |
| - |
59 |
| -images: |
60 |
| - - "gcr.io/k8s-image-staging/cluster-autoscaler:${_TAG}" |
| 8 | + - name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:latest" |
| 9 | + entrypoint: make |
| 10 | + env: |
| 11 | + - TAG=$_GIT_TAG |
| 12 | + args: |
| 13 | + - execute-release |
| 14 | +substitutions: |
| 15 | + _GIT_TAG: "0.0.0" # default value, this is substituted at build time |
0 commit comments