From ec119e6be172ed26a99a01af078996865ddd7d3a Mon Sep 17 00:00:00 2001 From: Or Shoval Date: Wed, 3 Jul 2024 11:20:55 +0300 Subject: [PATCH] cluster: Allow kubevirtci tag overriding It is helpful either manually or for example when used from CNAO, to use same tag of the cluster that CNAO deployed. Otherwise a kubevirtci tag mismatch can cause failures once running KMP e2e tests from CNAO. Signed-off-by: Or Shoval --- cluster/cluster.sh | 2 +- hack/bump-kubevirtci.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/cluster.sh b/cluster/cluster.sh index e2f2fa776..9e481881c 100644 --- a/cluster/cluster.sh +++ b/cluster/cluster.sh @@ -13,7 +13,7 @@ # limitations under the License. export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-'k8s-1.25'} -export KUBEVIRTCI_TAG='2211021552-8cca8c0' +export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2211021552-8cca8c0} 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. diff --git a/hack/bump-kubevirtci.sh b/hack/bump-kubevirtci.sh index 72726a938..62c36c14e 100755 --- a/hack/bump-kubevirtci.sh +++ b/hack/bump-kubevirtci.sh @@ -3,6 +3,6 @@ KUBEVIRTCI_TAG=$(curl -L -Ss https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirtci/latest) [[ ${#KUBEVIRTCI_TAG} != "18" ]] && echo "error getting KUBEVIRTCI_TAG" && exit 1 -sed -i "s/export KUBEVIRTCI_TAG=.*/export KUBEVIRTCI_TAG='${KUBEVIRTCI_TAG}'/g" cluster/cluster.sh +sed -i "s/\(KUBEVIRTCI_TAG:-\)[^}]*/\1${KUBEVIRTCI_TAG}/" cluster/cluster.sh git --no-pager diff cluster/cluster.sh | grep KUBEVIRTCI_TAG || true