-
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.
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: go | ||
|
||
go: | ||
- 1.10 | ||
|
||
go_import_path: github.com/kubernetes-sigs/kubebuilder | ||
|
||
cache: | ||
directories: | ||
- /tmp/kubebuilder/bin | ||
|
||
git: | ||
depth: 3 | ||
|
||
env: | ||
- TEST=example | ||
|
||
install: | ||
- test/scripts/install_tools.sh | ||
|
||
script: | ||
./test/travis.sh |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x -e | ||
|
||
# Build binaries | ||
export GOBIN=/tmp/kubebuilder/bin/ | ||
go install github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder-gen | ||
go install github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder | ||
|
||
export VENDOR_KB=/tmp/vendorbin/vendor/github.com/kubernetes-sigs/kubebuilder | ||
# Build vendor tar | ||
mkdir -p $VENDOR_KB/pkg/ || echo "" | ||
cp -r vendor/* /tmp/vendorbin/vendor/ | ||
cp -r pkg/* $VENDOR_KB/pkg/ | ||
cp LICENSE $VENDOR_KB/LICENSE | ||
cp Gopkg.lock /tmp/vendorbin | ||
cp Gopkg.toml /tmp/vendorbin | ||
|
||
# Copy the vendor tar to the installation directory | ||
export DEST=/tmp/kubebuilder/bin/ | ||
mkdir -p $DEST || echo "" | ||
cd /tmp/vendorbin | ||
tar -czvf $DEST/vendor.tar.gz vendor/ Gopkg.lock Gopkg.toml |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x -e | ||
|
||
# Download the dependency binaries | ||
export TOOLS=kubebuilder-tools-1.9-linux-amd64.tar.gz | ||
curl -L https://storage.googleapis.com/kubebuilder-tools/$TOOLS -o /tmp/$TOOLS | ||
mkdir -p /tmp/kubebuilder/bin/ | ||
tar xzvf /tmp/$TOOLS -C /tmp/ |
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,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x -e | ||
|
||
test/scripts/build_kubebuilder.sh | ||
|
||
#go build ./cmd/... | ||
#go build ./pkg/... | ||
#go test ./cmd/... | ||
#go test ./pkg/... | ||
|
||
# Create the working directory to test the repo setup | ||
export GOPATH=/tmp/go | ||
mkdir -p $GOPATH/src/github.com/kubernetes-sigs/kubebuilder-test/ | ||
cd $GOPATH/src/github.com/kubernetes-sigs/kubebuilder-test/ | ||
|
||
# Run the commands | ||
/tmp/kubebuilder/bin/kubebuilder init repo --domain sample.kubernetes.io | ||
/tmp/kubebuilder/bin/kubebuilder create resource --group insect --version v1beta1 --kind Bee | ||
#/tmp/kubebuilder/bin/kubebuilder create resource --group insect --version v1beta1 --kind Wasp | ||
|
||
export TEST_ASSET_KUBECTL=/tmp/kubebuilder/bin/kubectl | ||
export TEST_ASSET_KUBE_APISERVER=/tmp/kubebuilder/bin/kube-apiserver | ||
export TEST_ASSET_ETCD=/tmp/kubebuilder/bin/etcd | ||
|
||
# Verify the controller-manager builds and the tests pass | ||
go install github.com/kubernetes-sigs/kubebuilder-test/cmd/controller-manager | ||
go build ./cmd/... | ||
go build ./pkg/... | ||
go test ./cmd/... | ||
go test ./pkg/... |