Skip to content

Commit

Permalink
Merge pull request #250 from 0xFelix/cleanup-functest-virtctl
Browse files Browse the repository at this point in the history
cleanup: Remove remains of early functest implementation
  • Loading branch information
kubevirt-bot authored Sep 20, 2024
2 parents 571ac56 + d7c4135 commit a8e4afe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
13 changes: 1 addition & 12 deletions scripts/kubevirt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ _base_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
_kubectl="${_base_dir}/_kubevirt/cluster-up/kubectl.sh"
_kubessh="${_base_dir}/_kubevirt/cluster-up/ssh.sh"
_kubevirtcicli="${_base_dir}/_kubevirt/cluster-up/cli.sh"
_virtctl="${_base_dir}/_kubevirt/cluster-up/virtctl.sh"
_action=$1
shift

Expand Down Expand Up @@ -67,10 +66,6 @@ function kubevirt::registry() {
echo "localhost:${port}"
}

function kubevirt::functest() {
KUBECTL=${_kubectl} VIRTCTL=${_virtctl} "${_base_dir}/scripts/functest.sh"
}

kubevirt::install

cd "${_base_dir}"/_kubevirt
Expand All @@ -94,20 +89,14 @@ case ${_action} in
"registry")
kubevirt::registry
;;
"functest")
kubevirt::functest
;;
"ssh")
${_kubessh} "$@"
;;
"kubectl")
${_kubectl} "$@"
;;
"virtctl")
${_virtctl} "$@"
;;
*)
echo "No command provided, known commands are 'up', 'down', 'sync', 'ssh', 'kubeconfig', 'registry', 'kubectl', 'functest'"
echo "No command provided, known commands are 'up', 'down', 'sync', 'ssh', 'kubeconfig', 'registry', 'kubectl'"
exit 1
;;
esac
Expand Down
20 changes: 1 addition & 19 deletions scripts/kubevirtci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ export KUBEVIRT_VERSION=${KUBEVIRT_VERSION:-main)}

_base_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
_cluster_up_dir="${_base_dir}/_cluster-up"
_virtctl_dir="${_cluster_up_dir}/_out/cmd/virtctl"
_kubectl="${_cluster_up_dir}/cluster-up/kubectl.sh"
_kubessh="${_cluster_up_dir}/cluster-up/ssh.sh"
_kubevirtcicli="${_cluster_up_dir}/cluster-up/cli.sh"
_virtctl="${_cluster_up_dir}/cluster-up/virtctl.sh"
_action=$1
shift

Expand All @@ -57,12 +55,6 @@ function kubevirtci::up() {
${_kubectl} apply -f "https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml"
${_kubectl} apply -f "https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-cr.yaml"

# This is needed because kubevirtci does not provide its own virtctl binary
echo "installing virtctl..."
mkdir -p "${_virtctl_dir}"
curl -L "https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/virtctl-${KUBEVIRT_VERSION}-linux-amd64" -o "${_virtctl_dir}/virtctl"
chmod +x "${_virtctl_dir}/virtctl"

echo "waiting for kubevirt to become ready, this can take a few minutes..."
${_kubectl} -n kubevirt wait kv kubevirt --for condition=Available --timeout=15m

Expand Down Expand Up @@ -94,10 +86,6 @@ function kubevirtci::registry() {
echo "localhost:${port}"
}

function kubevirtci::functest() {
KUBECTL=${_kubectl} VIRTCTL=${_virtctl} "${_base_dir}/scripts/functest.sh"
}

kubevirtci::fetch_kubevirtci

case ${_action} in
Expand All @@ -119,20 +107,14 @@ case ${_action} in
"registry")
kubevirtci::registry
;;
"functest")
kubevirtci::functest
;;
"ssh")
${_kubessh} "$@"
;;
"kubectl")
${_kubectl} "$@"
;;
"virtctl")
${_virtctl} "$@"
;;
*)
echo "No command provided, known commands are 'up', 'down', 'sync', 'ssh', 'kubeconfig', 'registry', 'kubectl', 'functest'"
echo "No command provided, known commands are 'up', 'down', 'sync', 'ssh', 'kubeconfig', 'registry', 'kubectl'"
exit 1
;;
esac

0 comments on commit a8e4afe

Please sign in to comment.