Skip to content

Commit

Permalink
Merge pull request #87 from piotrmsc/fix/ci
Browse files Browse the repository at this point in the history
fix: installing kubebuilder binary.
  • Loading branch information
Demonsthere authored Aug 31, 2021
2 parents 56886f7 + 36879b4 commit 123d62e
Showing 1 changed file with 19 additions and 37 deletions.
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

0 comments on commit 123d62e

Please sign in to comment.