From 691802758eefc8038197f52a07cf20641106cf9a Mon Sep 17 00:00:00 2001 From: Andres Date: Tue, 31 Jul 2018 13:28:46 +0200 Subject: [PATCH] Use latest kubeless --- .circleci/config.yml | 15 ++++++++++++--- .gitignore | 1 + script/cluster-up-minikube.sh | 17 ----------------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80cc2ede..6986cacd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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: diff --git a/.gitignore b/.gitignore index ce13e71e..c630ea94 100644 --- a/.gitignore +++ b/.gitignore @@ -153,3 +153,4 @@ bundles/ docker/nats-controller/nats-controller ksonnet-lib/ nats.yaml +/kubeless diff --git a/script/cluster-up-minikube.sh b/script/cluster-up-minikube.sh index 8976101c..605c6835 100755 --- a/script/cluster-up-minikube.sh +++ b/script/cluster-up-minikube.sh @@ -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:?} @@ -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)