mirror of https://github.com/k3s-io/k3s
Use VERSION_K8S in tests instead of grep go.mod
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/8155/head
parent
bc332ac667
commit
b2e71553ce
|
@ -29,7 +29,7 @@ export -f test-post-hook
|
|||
|
||||
REPO=${REPO:-rancher}
|
||||
IMAGE_NAME=${IMAGE_NAME:-k3s}
|
||||
PREVIOUS_CHANNEL=$(grep 'k8s.io/kubernetes v' go.mod | head -n1 | awk '{print $2}' | awk -F. '{print "v1." ($2 - 1)}')
|
||||
PREVIOUS_CHANNEL=$(echo ${VERSION_K8S} | awk -F. '{print "v1." ($2 - 1)}')
|
||||
PREVIOUS_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/${PREVIOUS_CHANNEL} -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
STABLE_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/stable -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
LATEST_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/latest -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
|
|
|
@ -14,7 +14,7 @@ export SERVER_1_ARGS="--cluster-init"
|
|||
|
||||
REPO=${REPO:-rancher}
|
||||
IMAGE_NAME=${IMAGE_NAME:-k3s}
|
||||
PREVIOUS_CHANNEL=$(grep 'k8s.io/kubernetes v' go.mod | head -n1 | awk '{print $2}' | awk -F. '{print "v1." ($2 - 1)}')
|
||||
PREVIOUS_CHANNEL=$(echo ${VERSION_K8S} | awk -F. '{print "v1." ($2 - 1)}')
|
||||
PREVIOUS_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/${PREVIOUS_CHANNEL} -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
STABLE_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/stable -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
LATEST_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/latest -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
|
|
|
@ -13,7 +13,7 @@ export WAIT_SERVICES="${all_services[@]}"
|
|||
|
||||
REPO=${REPO:-rancher}
|
||||
IMAGE_NAME=${IMAGE_NAME:-k3s}
|
||||
CURRENT_CHANNEL=$(grep 'k8s.io/kubernetes v' go.mod | head -n1 | awk '{print $2}' | awk -F. '{print "v1." $2}')
|
||||
CURRENT_CHANNEL=$(echo ${VERSION_K8S} | awk -F. '{print "v1." $2}')
|
||||
CURRENT_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/${CURRENT_CHANNEL} -o /dev/null -w '%{redirect_url}' | awk -F/ '{print gensub(/\+/, "-", "g", $NF)}')
|
||||
if [ -z "${CURRENT_VERSION}" ]; then
|
||||
CURRENT_VERSION=${VERSION_TAG}
|
||||
|
|
Loading…
Reference in New Issue