From 7b6e2d98eccf491833276b22533e000e5de0002c Mon Sep 17 00:00:00 2001 From: kubevirt-bot Date: Thu, 26 Aug 2021 11:28:28 +0200 Subject: [PATCH] [release-v0.31] Update provider k8s-1.21 (#333) * cluster, Update kubevirtci by KUBEVIRTCI_TAG Currently the folder is following KUBEVIRTCI_VERSION which is not used anymore. Move to KUBEVIRTCI_TAG by comparing kubevirtci repo tag Signed-off-by: Ram Lavi * cluster, Update KUBEVIRTCI_TAG to latest Signed-off-by: Ram Lavi * Update KUBEVIRT_PROVIDER to k8s-1.21 Signed-off-by: Ram Lavi Co-authored-by: Ram Lavi --- automation/check-patch.e2e-k8s.sh | 2 +- cluster/cluster.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/automation/check-patch.e2e-k8s.sh b/automation/check-patch.e2e-k8s.sh index 01bef7de6..9b949f693 100755 --- a/automation/check-patch.e2e-k8s.sh +++ b/automation/check-patch.e2e-k8s.sh @@ -6,7 +6,7 @@ teardown() { } main() { - export KUBEVIRT_PROVIDER='k8s-1.19' + export KUBEVIRT_PROVIDER='k8s-1.21' source automation/check-patch.setup.sh cd ${TMP_PROJECT_PATH} diff --git a/cluster/cluster.sh b/cluster/cluster.sh index 8f3b00b41..451476dc0 100644 --- a/cluster/cluster.sh +++ b/cluster/cluster.sh @@ -12,10 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-'k8s-1.19'} -export KUBEVIRTCI_TAG='2102031339-9306210' +export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-'k8s-1.21'} +export KUBEVIRTCI_TAG='2108251059-2c2862b' -KUBEVIRTCI_VERSION="9306210cbf3905b7df2e11a62a30a0c3bc60c470" KUBEVIRTCI_REPO='https://github.com/kubevirt/kubevirtci.git' # The CLUSTER_PATH var is used in cluster folder and points to the _kubevirtci where the cluster is deployed from. CLUSTER_PATH=${CLUSTER_PATH:-"${PWD}/_kubevirtci/"} @@ -24,14 +23,14 @@ function cluster::_get_repo() { git --git-dir ${CLUSTER_PATH}/.git remote get-url origin } -function cluster::_get_version() { - git --git-dir ${CLUSTER_PATH}/.git log --format="%H" -n 1 +function cluster::_get_tag() { + git -C ${CLUSTER_PATH} describe --tags } function cluster::install() { # Remove cloned kubevirtci repository if it does not match the requested one if [ -d ${CLUSTER_PATH} ]; then - if [ $(cluster::_get_repo) != ${KUBEVIRTCI_REPO} -o $(cluster::_get_version) != ${KUBEVIRTCI_VERSION} ]; then + if [ $(cluster::_get_repo) != ${KUBEVIRTCI_REPO} -o $(cluster::_get_tag) != ${KUBEVIRTCI_TAG} ]; then rm -rf ${CLUSTER_PATH} fi fi @@ -40,7 +39,7 @@ function cluster::install() { git clone https://github.com/kubevirt/kubevirtci.git ${CLUSTER_PATH} ( cd ${CLUSTER_PATH} - git checkout ${KUBEVIRTCI_VERSION} + git checkout ${KUBEVIRTCI_TAG} ) fi }