forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 22
/
cloudbuild.yaml
44 lines (42 loc) · 1.97 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
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Instructions to run locally:
# Download google container builder: https://github.com/kubernetes-sigs/container-builder-local
# Set you GOOS and GOARCH vars to match your system
# Set OUTPUT to the location to write the directory containing the tar.gz
# $ container-builder-local --config=build/cloudbuild_with_goreleaser.yaml --dryrun=false \
# --write-workspace=$OUTPUT .
# Release tar will be in $OUTPUT
steps:
- name: "gcr.io/cloud-builders/git"
args: [fetch, --tags, --depth=100]
- name: "ubuntu"
args: ["mkdir", "-p", "/workspace/_output/linux_amd64"]
- name: "gcr.io/kubebuilder/thirdparty-linux:1.16.4"
args: ["tar", "-xzvf", "/kubebuilder_linux_amd64.tar.gz"]
dir: "_output/linux_amd64"
- name: "ubuntu"
args: ["mkdir", "-p", "/workspace/_output/darwin_amd64"]
- name: "gcr.io/kubebuilder/thirdparty-darwin:1.16.4"
args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"]
dir: "_output/darwin_amd64"
- name: "gcr.io/kubebuilder/goreleaser_with_go_1.12.5:0.0.1"
args: ["bash", "build/build_kubebuilder.sh"]
env:
- 'KUBERNETES_VERSION=1.16.4'
secretEnv: ['GITHUB_TOKEN']
secrets:
- kmsKeyName: projects/kubebuilder/locations/global/keyRings/kubebuilder-gh-tokens/cryptoKeys/gh-release-token
secretEnv:
GITHUB_TOKEN: CiQAChsKTruEiSo6yBI+xg75jyr4f8yM93R2e9QbpeRX3jF3VAwSUQDQuYkCiUd+6e/1wKQAyHnf6BYv0GNGMghyNzYbXT0owBzQqmIQJeu/VDGZcEVabIWErNXjbPqPiysIu0uAiKAAUTUK0VYMr9E6GdTJ0+hVmg==