Skip to content

Commit

Permalink
[release-v0.31] Update provider k8s-1.21 (#333)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* cluster, Update KUBEVIRTCI_TAG to latest

Signed-off-by: Ram Lavi <[email protected]>

* Update KUBEVIRT_PROVIDER to k8s-1.21

Signed-off-by: Ram Lavi <[email protected]>

Co-authored-by: Ram Lavi <[email protected]>
  • Loading branch information
kubevirt-bot and RamLavi authored Aug 26, 2021
1 parent 90ef497 commit 7b6e2d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion automation/check-patch.e2e-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
13 changes: 6 additions & 7 deletions cluster/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"}
Expand All @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 7b6e2d9

Please sign in to comment.