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

Commit

Permalink
Merge pull request #4 from kubeless/latestKubeless
Browse files Browse the repository at this point in the history
Use latest kubeless
  • Loading branch information
andresmgot authored Jul 31, 2018
2 parents 1cfbefd + a4abff6 commit 7cf6cbc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 45 deletions.
17 changes: 12 additions & 5 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 Expand Up @@ -146,6 +155,4 @@ jobs:
- attach_workspace:
at: /tmp/go
- <<: *restore_workspace
- run: make VERSION=${CIRCLE_TAG} binary-cross
- run: for d in bundles/kubeless_*; do zip -r9 $d.zip $d/; done
- run: ./script/create_release.sh ${CIRCLE_TAG} "${MANIFESTS}"
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
7 changes: 2 additions & 5 deletions script/create_release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -e

REPO_NAME=kubeless
REPO_DOMAIN=nats-trigger
REPO_NAME=nats-trigger
REPO_DOMAIN=kubeless
TAG=${1:?}
MANIFESTS=${2:?} # Space separated list of manifests to publish

Expand Down Expand Up @@ -33,6 +33,3 @@ for f in "${manifests[@]}"; do
cp ${PROJECT_DIR}/${f}.yaml ${PROJECT_DIR}/${f}-${TAG}.yaml
upload_asset $REPO_DOMAIN $REPO_NAME "$RELEASE_ID" "${PROJECT_DIR}/${f}-${TAG}.yaml"
done
for f in `ls ${PROJECT_DIR}/bundles/kubeless_*.zip`; do
upload_asset $REPO_DOMAIN $REPO_NAME $RELEASE_ID $f
done
19 changes: 1 addition & 18 deletions script/release_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,10 @@ This release includes the following commits and features:\\n\
$commits\\n\\n\
To install this latest version, use the manifest that is part of the release:\\n\
\\n\
**WITH RBAC ENABLED:**\\n\
\\n\
\`\`\`console\\n\
kubectl create ns kubeless\\n\
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$tag/kubeless-$tag.yaml \\n\
kubectl create -f https://github.com/kubeless/nats-trigger/releases/download/$tag/nats-$tag.yaml \\n\
\`\`\`\\n\
\\n\
**WITHOUT RBAC:**\\n\
\\n\
\`\`\`console\\n\
kubectl create ns kubeless\\n\
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$tag/kubeless-non-rbac-$tag.yaml \\n\
\`\`\`\\n\
**OPENSHIFT:**\\n\
\\n\
\`\`\`console\\n\
oc create ns kubeless\\n\
oc create -f https://github.com/kubeless/kubeless/releases/download/$tag/kubeless-openshift-$tag.yaml \\n\
# Kafka\\n\
oc create -f https://github.com/kubeless/kubeless/releases/download/$tag/kafka-zookeeper-openshift-$tag.yaml \\n\
\`\`\`\\n\
")
echo "${notes}"
}
Expand Down

0 comments on commit 7cf6cbc

Please sign in to comment.