-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlights: - Uses GoReleaser for building and publishing releases to Github - Remove testing during the build process (will do done through Travis as presubmit)
- Loading branch information
Showing
6 changed files
with
186 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This is a GoReleaser configuration file for Kubebuilder release. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
builds: | ||
- main: ./cmd/kubebuilder | ||
binary: kubebuilder | ||
ldflags: -s -X github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/version.kubebuilderVersion={{.Version}} -X github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/version.gitCommit={{.Commit}} -X github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/version.buildDate={{.Date}} -X github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/version.kubernetesVendorVersion={{.Env.KUBERNETES_VERSION}} | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CGO_ENABLED=0 | ||
- main: ./cmd/kubebuilder-gen | ||
binary: kubebuilder-gen | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CGO_ENABLED=0 | ||
archive: | ||
files: | ||
- "/workspace/_output/kubebuilder/bin/vendor.tar.gz" | ||
- "/workspace/_output/{{ .Os }}_{{ .Arch }}/kubebuilder/bin/*" | ||
wrap_in_directory: true | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "master" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
release: | ||
github: | ||
owner: kubernetes-sigs | ||
name: kubebuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 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: "ubuntu" | ||
args: ["mkdir", "-p", "/workspace/_output/linux_amd64"] | ||
- name: "gcr.io/kubebuilder/thirdparty-linux:1.9" | ||
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.9" | ||
args: ["tar", "-xzvf", "/kubebuilder_darwin_amd64.tar.gz"] | ||
dir: "_output/darwin_amd64" | ||
- name: "ubuntu" | ||
args: ["bash", "build/build_vendor.sh"] | ||
- name: "gcr.io/kubebuilder/goreleaser_with_go_1.10:0.0.1" | ||
args: ["bash", "build/build_kubebuilder.sh", "--snapshot"] | ||
env: | ||
- 'KUBERNETES_VERSION=1.9' | ||
secretEnv: ['GITHUB_TOKEN'] | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-h', 'Content-Type:application/gzip', 'cp', '-a', 'public-read', 'kubebuilder_master_linux_amd64.tar.gz', 'gs://kubebuilder-release/kubebuilder_master_linux_amd64.tar.gz'] | ||
- name: 'gcr.io/cloud-builders/gsutil' | ||
args: ['-h', 'Content-Type:application/gzip', 'cp', '-a', 'public-read', 'kubebuilder_master_darwin_amd64.tar.gz', 'gs://kubebuilder-release/kubebuilder_master_darwin_amd64.tar.gz'] | ||
secrets: | ||
- kmsKeyName: projects/kubebuilder/locations/global/keyRings/kubebuilder-gh-tokens/cryptoKeys/gh-release-token | ||
secretEnv: | ||
GITHUB_TOKEN: CiQAChsKTruEiSo6yBI+xg75jyr4f8yM93R2e9QbpeRX3jF3VAwSUQDQuYkCiUd+6e/1wKQAyHnf6BYv0GNGMghyNzYbXT0owBzQqmIQJeu/VDGZcEVabIWErNXjbPqPiysIu0uAiKAAUTUK0VYMr9E6GdTJ0+hVmg== |