Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: installing kubebuilder binary. #87

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 19 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
kube-builder: &install-kube-builder
name: Fetch kube-builder
command: |
os=$(go env GOOS)
arch=$(go env GOARCH)

# Download kubebuilder and extract it to tmp
# Temporary solution, older versions of kubebuilder are nolonger available under old urls.
# Upgrading kubebuilder to latest version is a bigger story and needs more work.
# We will use direct GH release URL for now.
curl -sL https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.2/kubebuilder_2.3.2_${os}_${arch}.tar.gz | tar -xz -C /tmp/

# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.2_${os}_${arch} /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin
version: 2
jobs:
build:
Expand All @@ -7,19 +23,7 @@ jobs:
steps:
- checkout
- run:
name: Fetch kube-builder
command: |
os=$(go env GOOS)
arch=$(go env GOARCH)

# download kubebuilder and extract it to tmp
curl -sL https://go.kubebuilder.io/dl/2.3.2/${os}/${arch} | tar -xz -C /tmp/

# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.2_${os}_${arch} /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin

<<: *install-kube-builder
- run: make
test:
docker:
Expand All @@ -28,18 +32,7 @@ jobs:
steps:
- checkout
- run:
name: Fetch kube-builder
command: |
os=$(go env GOOS)
arch=$(go env GOARCH)

# download kubebuilder and extract it to tmp
curl -sL https://go.kubebuilder.io/dl/2.3.2/${os}/${arch} | tar -xz -C /tmp/

# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.2_${os}_${arch} /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin
<<: *install-kube-builder
- run: make test
test-integration:
machine: true
Expand All @@ -54,18 +47,7 @@ jobs:
sudo echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
go version
- run:
name: Download kube-builder
command: |
os=$(go env GOOS)
arch=$(go env GOARCH)

# download kubebuilder and extract it to tmp
curl -sL https://go.kubebuilder.io/dl/2.3.2/${os}/${arch} | tar -xz -C /tmp/

# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.2_${os}_${arch} /usr/local/kubebuilder
sudo echo "export PATH=$PATH:/usr/local/kubebuilder/bin" >> $HOME/.profile
<<: *install-kube-builder
- run:
name: Install kustomize
command: |
Expand Down