|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
| 15 | +# Instructions to run locally: |
| 16 | +# Download google container builder: https://github.com/kubernetes-sigs/container-builder-local |
| 17 | +# Set you GOOS and GOARCH vars to match your system |
| 18 | +# Set OUTPUT to the location to write the directory containing the tar.gz |
| 19 | +# $ container-builder-local --config=build/cloudbuild_with_goreleaser.yaml --dryrun=false \ |
| 20 | +# --write-workspace=$OUTPUT . |
| 21 | +# Release tar will be in $OUTPUT |
| 22 | + |
15 | 23 | steps:
|
16 | 24 | - name: "ubuntu"
|
17 |
| - args: ["mkdir", "-p", "/workspace/_output"] |
18 |
| -- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}:1.9" |
19 |
| - args: ["tar", "-xzvf", "/kubebuilder_${_GOOS}_${_GOARCH}.tar.gz"] |
20 |
| - dir: "_output" |
21 |
| -- name: "golang:1.10-stretch" |
22 |
| - args: ["bash", "build/build_kubebuilder.sh"] |
23 |
| - env: |
24 |
| - - 'GOOS=${_GOOS}' |
25 |
| - - 'GOARCH=${_GOARCH}' |
26 |
| - - 'CGO=0' |
27 |
| - - 'VERSION=${TAG_NAME}' |
28 |
| - - 'KUBERNETES_VERSION=v1.9' |
| 25 | + args: ["mkdir", "-p", "/workspace/_output/linux_amd64"] |
| 26 | +- name: "gcr.io/kubebuilder/thirdparty-linux:1.9" |
| 27 | + args: ["tar", "-xzvf", "/kubebuilder_linux_amd64.tar.gz"] |
| 28 | + dir: "_output/linux_amd64" |
29 | 29 | - name: "ubuntu"
|
30 |
| - args: ["bash", "build/build_vendor.sh"] |
| 30 | + args: ["mkdir", "-p", "/workspace/_output/darwin_amd64"] |
| 31 | +- name: "gcr.io/kubebuilder/thirdparty-darwin:1.9" |
| 32 | + args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"] |
| 33 | + dir: "_output/darwin_amd64" |
31 | 34 | - name: "ubuntu"
|
32 |
| - args: ["bash", "build/package.sh"] |
33 |
| - env: |
34 |
| - - 'GOOS=${_GOOS}' |
35 |
| - - 'GOARCH=${_GOARCH}' |
36 |
| - - 'VERSION=${TAG_NAME}' |
37 |
| -- name: "golang:1.10-stretch" |
38 |
| - args: ["bash", "build/test.sh"] |
39 |
| - env: |
40 |
| - - 'GOOS=${_GOOS}' |
41 |
| - - 'GOARCH=${_GOARCH}' |
42 |
| - - 'VERSION=${TAG_NAME}' |
43 |
| -- name: 'gcr.io/cloud-builders/gsutil' |
44 |
| - args: ['-h', 'Content-Type:application/gzip', 'cp', '-a', 'public-read', 'kubebuilder-${TAG_NAME}-${_GOOS}-${_GOARCH}.tar.gz', 'gs://kubebuilder-release/kubebuilder-${TAG_NAME}-${_GOOS}-${_GOARCH}.tar.gz'] |
| 35 | + args: ["bash", "build/build_vendor.sh"] |
| 36 | +- name: "gcr.io/kubebuilder/goreleaser_with_go_1.10:0.0.1" |
| 37 | + args: ["bash", "build/build_kubebuilder.sh"] |
45 | 38 | env:
|
46 |
| - - 'GOOS=${_GOOS}' |
47 |
| - - 'GOARCH=${_GOARCH}' |
48 |
| - - 'VERSION=${TAG_NAME}' |
| 39 | + - 'KUBERNETES_VERSION=1.9' |
| 40 | + secretEnv: ['GITHUB_TOKEN'] |
| 41 | +secrets: |
| 42 | +- kmsKeyName: projects/kubebuilder/locations/global/keyRings/kubebuilder-gh-tokens/cryptoKeys/gh-release-token |
| 43 | + secretEnv: |
| 44 | + GITHUB_TOKEN: CiQAChsKTruEiSo6yBI+xg75jyr4f8yM93R2e9QbpeRX3jF3VAwSUQDQuYkCiUd+6e/1wKQAyHnf6BYv0GNGMghyNzYbXT0owBzQqmIQJeu/VDGZcEVabIWErNXjbPqPiysIu0uAiKAAUTUK0VYMr9E6GdTJ0+hVmg== |
0 commit comments