forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes-sigs#78 from droot/build-automation
added release automation
- Loading branch information
Showing
6 changed files
with
176 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,43 @@ | ||
# 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_snapshot.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' | ||
- 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'] |