Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Use latest kubeless
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres committed Jul 31, 2018
1 parent 3b915f0 commit 6918027
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ restore_workspace: &restore_workspace
run: |
make bootstrap
sudo cp -r /tmp/go/bin/* /usr/local/bin/
cp -r /tmp/go/src/github.com/kubeless/nats-trigger/*yaml .
cp -r /tmp/go/src/github.com/kubeless/nats-trigger/build-manifests/*yaml .
should_test: &should_test
run: |
case $CIRCLE_JOB in
Expand Down Expand Up @@ -85,12 +85,21 @@ jobs:
- checkout
- <<: *exports
- run: make bootstrap
- run: mkdir build-manifests
# Install kubeless required files
- run: |
git clone https://github.com/kubeless/kubeless.git $GOPATH/src/github.com/kubeless/kubeless
ln -s $(pwd)/ksonnet-lib $GOPATH/src/github.com/kubeless/kubeless/ksonnet-lib
cd $GOPATH/src/github.com/kubeless/kubeless
make binary
make all-yaml
cd -
cp $GOPATH/src/github.com/kubeless/kubeless/kubeless-non-rbac.yaml $GOPATH/src/github.com/kubeless/kubeless/kubeless.yaml build-manifests/
- run: make VERSION=${CONTROLLER_TAG} binary
- run: make test
- run: make validation
- run: make all-yaml
- run: |
mkdir build-manifests
IFS=' ' read -r -a manifests <<< "$MANIFESTS"
for f in "${manifests[@]}"; do
sed -i.bak 's/:latest/'":${CONTROLLER_TAG}"'/g' ${f}.yaml
Expand All @@ -100,7 +109,7 @@ jobs:
root: /home/circleci/.go_workspace
paths:
- bin
- src/github.com/kubeless/nats-trigger/*yaml
- src/github.com/kubeless/nats-trigger/build-manifests/*yaml
- store_artifacts:
path: /home/circleci/.go_workspace/bin/kubeless
- store_artifacts:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@ bundles/
docker/nats-controller/nats-controller
ksonnet-lib/
nats.yaml
/kubeless
17 changes: 0 additions & 17 deletions script/cluster-up-minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export KUBECONFIG=$HOME/.kube/config
export PATH=${PATH}:${GOPATH:?}/bin

MINIKUBE_VERSION=${MINIKUBE_VERSION:?}
export KUBELESS_VERSION=$(curl -s https://api.github.com/repos/kubeless/kubeless/releases/latest | grep tag_name | cut -d '"' -f 4)

install_bin() {
local exe=${1:?}
Expand All @@ -49,27 +48,11 @@ check_or_install_minikube() {
install_bin ./minikube
}
}
check_or_install_kubeless() {
which kubeless || {
sudo wget https://github.com/kubeless/kubeless/releases/download/$KUBELESS_VERSION/kubeless_$(go env GOOS)-$(go env GOARCH).zip
unzip kubeless_$(go env GOOS)-$(go env GOARCH).zip
sudo cp ./bundles/kubeless_$(go env GOOS)-$(go env GOARCH)/kubeless /usr/local/bin/kubeless
sudo chmod +x /usr/local/bin/kubeless
}
}
install_kubeless_manifests() {
wget -q -O kubeless-non-rbac.yaml https://github.com/kubeless/kubeless/releases/download/$KUBELESS_VERSION/kubeless-non-rbac-$KUBELESS_VERSION.yaml
wget -q -O kubeless.yaml https://github.com/kubeless/kubeless/releases/download/$KUBELESS_VERSION/kubeless-$KUBELESS_VERSION.yaml
}

# Install nsenter if missing
check_or_build_nsenter
# Install minikube if missing
check_or_install_minikube
# Install Kubeless if missing
check_or_install_kubeless
# Install Kubeless manifests
install_kubeless_manifests

MINIKUBE_BIN=$(which minikube)

Expand Down

0 comments on commit 6918027

Please sign in to comment.