Skip to content

Commit

Permalink
Merge pull request kubean-io#1094 from tu1h/fix_verify_kubespray_e2e
Browse files Browse the repository at this point in the history
Fix verify Kubespray e2e
  • Loading branch information
ErikJiang authored Jan 24, 2024
2 parents 61b31a2 + 03e1299 commit 395ebda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/verify-kubespray.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
echo ${{ runner.os }}
echo ${{ runner.arch }}
echo ${{ github.workspace }}
export KUBE_VERSION=v1.27.10
bash hack/e2e.sh "${HELM_CHART_VERSION}" "${CONTAINER_TAG}" ${{ runner.name }} "${VSPHERE_USER}" "${VSPHERE_PASSWD}" "${AMD_ROOT_PASSWORD}" "${KYLIN_VM_PASSWORD}" "PR"
print_kubespray_commit_sha:
Expand Down
8 changes: 8 additions & 0 deletions hack/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ set -e
source "${REPO_ROOT}"/hack/util.sh
source "${REPO_ROOT}"/hack/offline-util.sh

export KUBE_VERSION=${KUBE_VERSION:-""}

GOPATH=$(go env GOPATH | awk -F ':' '{print $1}')
export PATH=$PATH:$GOPATH/bin
rm -f ~/.ssh/known_hosts
Expand Down Expand Up @@ -46,6 +48,9 @@ cp -f "${REPO_ROOT}"/test/common/kubeanClusterOps.yml "${REPO_ROOT}"/test/kubea
sed -i "s/ip:/ip: ${vm_ip_addr1}/" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/hosts-conf-cm.yml
sed -i "s/ansible_host:/ansible_host: ${vm_ip_addr1}/" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/hosts-conf-cm.yml
sed -i "s/root_password/${AMD_ROOT_PASSWORD}/g" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/hosts-conf-cm.yml
if [ -n "$KUBE_VERSION" ]; then
sed -i "s/kube_version: .*/kube_version: ${KUBE_VERSION}/" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/vars-conf-cm.yml
fi

sed -i "s#image:#image: ${SPRAY_JOB}#" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/kubeanClusterOps.yml
sed -i "s/e2e-cluster1-install/${CLUSTER_OPERATION_NAME1}/" "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster/kubeanClusterOps.yml
Expand All @@ -71,6 +76,9 @@ cp -r "${REPO_ROOT}"/test/kubean_functions_e2e/e2e-install-cluster "${REPO_ROOT}
sed -i "s/${CLUSTER_OPERATION_NAME1}/${CLUSTER_OPERATION_NAME2}/" "${REPO_ROOT}"/test/kubean_reset_e2e/e2e-install-cluster-docker/kubeanClusterOps.yml
#sed -i "s/containerd/docker/" "${REPO_ROOT}"/test/kubean_reset_e2e/e2e-install-cluster-docker/vars-conf-cm.yml
sed -i "$ a\ override_system_hostname: false" "${REPO_ROOT}"/test/kubean_reset_e2e/e2e-install-cluster-docker/vars-conf-cm.yml
if [ -n "$KUBE_VERSION" ]; then
sed -i "s/kube_version: .*/kube_version: ${KUBE_VERSION}/" "${REPO_ROOT}"/test/kubean_reset_e2e/e2e-install-cluster-docker/vars-conf-cm.yml
fi

ginkgo -v -race --fail-fast --skip "\[bug\]" ./test/kubean_reset_e2e/ -- --kubeconfig="${KUBECONFIG_FILE}" \
--clusterOperationName="${CLUSTER_OPERATION_NAME2}" --vmipaddr="${vm_ip_addr1}" \
Expand Down

0 comments on commit 395ebda

Please sign in to comment.