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

cleanup: install the latest release version #461

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions hack/install_kubespider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ if [[ $(docker ps | grep aria2-pro) == "" ]]; then
fi

# 7.Deploy kubespider
export KUBESPIDER_DEFAULT_VERSION="latest"
if [[ -z "${KUBESPIDER_VERSION}" ]]; then
export KUBESPIDER_VERSION=${KUBESPIDER_DEFAULT_VERSION}
fi
export KUBESPIDER_VERSION=${KUBESPIDER_VERSION:-$(util::get_latest_release_version)}
docker run -itd --name kubespider \
--log-opt max-size=5m \
-v ${KUBESPIDER_HOME}/kubespider/.config:/app/.config \
Expand Down
1 change: 1 addition & 0 deletions hack/test/deploy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function handle_trap() {
trap handle_trap ERR EXIT

#1. Test deploy Kubespider
export KUBESPIDER_VERSION=latest
./hack/install_kubespider.sh
sleep 10
docker ps | grep -e kubespider -e aria2-pro
Expand Down
4 changes: 4 additions & 0 deletions hack/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ function util::set_registry_for_image() {
export image_registry=index.docker.io/cesign
fi
}

function util::get_latest_release_version() {
curl --silent https://api.github.com/repos/opennaslab/kubespider/tags | grep -o '"name": "[^"]*' | cut -d'"' -f4 | head -n1
}
Loading