Skip to content

Commit

Permalink
use daemonset for windows-np test
Browse files Browse the repository at this point in the history
Signed-off-by: Zhecheng Li <lzhecheng@vmware.com>
  • Loading branch information
lzhecheng committed Jul 28, 2021
1 parent 04a3a3a commit fbd60d1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ci/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IMAGE_PULL_POLICY="Always"
WINDOWS_CONFORMANCE_FOCUS="\[sig-network\].+\[Conformance\]|\[sig-windows\]"
WINDOWS_CONFORMANCE_SKIP="\[LinuxOnly\]|\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|\[Privileged\]|should be able to change the type from|\[sig-network\] Services should be able to create a functioning NodePort service \[Conformance\]|Service endpoints latency should not be very high|should be able to create a functioning NodePort service for Windows"
WINDOWS_NETWORKPOLICY_FOCUS="\[Feature:NetworkPolicy\]"
WINDOWS_NETWORKPOLICY_SKIP="SKIP_NO_TESTCASE"
WINDOWS_NETWORKPOLICY_SKIP="SCTP"
CONFORMANCE_SKIP="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]"
NETWORKPOLICY_SKIP="should allow egress access to server in CIDR block|should enforce except clause while egress access to server in CIDR block"

Expand Down Expand Up @@ -232,7 +232,7 @@ function deliver_antrea_windows {
chmod -R g-w build/images/ovs
chmod -R g-w build/images/base
DOCKER_REGISTRY="${DOCKER_REGISTRY}" ./hack/build-antrea-ubuntu-all.sh --pull
if [[ "$TESTCASE" =~ "networkpolicy" ]]; then
if [[ "$TESTCASE" =~ "networkpolicy-no" ]]; then
make windows-bin
make antctl-windows
fi
Expand Down Expand Up @@ -280,7 +280,7 @@ function deliver_antrea_windows {
done

# Use a script to run antrea agent in windows Network Policy cases
if [ "$TESTCASE" == "windows-networkpolicy" ]; then
if [ "$TESTCASE" == "windows-networkpolicy-no" ]; then
for i in `seq 24`; do
sleep 5
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "W32tm /resync /force" | grep successfully && break
Expand Down Expand Up @@ -313,7 +313,7 @@ function deliver_antrea_windows {
done
echo "=== Build Windows on Windows Node==="
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "docker pull ${DOCKER_REGISTRY}/antrea/golang:1.15 && docker tag ${DOCKER_REGISTRY}/antrea/golang:1.15 golang:1.15"
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "rm -rf antrea && mkdir antrea && cd antrea && tar -xzf ../antrea_repo.tar.gz && sed -i \"s|build/images/Dockerfile.build.windows .|build/images/Dockerfile.build.windows . --network host|g\" Makefile && NO_PULL=${NO_PULL} make build-windows && docker save -o antrea-windows.tar ${DOCKER_REGISTRY}/antrea/antrea-windows:latest && gzip -f antrea-windows.tar" || true
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "rm -rf antrea && mkdir antrea && cd antrea && tar -xzf ../antrea_repo.tar.gz >> /dev/null && sed -i \"s|build/images/Dockerfile.build.windows .|build/images/Dockerfile.build.windows . --network host|g\" Makefile && NO_PULL=${NO_PULL} make build-windows && docker save -o antrea-windows.tar ${DOCKER_REGISTRY}/antrea/antrea-windows:latest && gzip -f antrea-windows.tar" || true
for i in `seq 2`; do
timeout 2m scp -o StrictHostKeyChecking=no -T Administrator@${IP}:antrea/antrea-windows.tar.gz . && break
done
Expand Down Expand Up @@ -497,18 +497,18 @@ function run_conformance_windows {
export PATH=$GOROOT/bin:$PATH
export KUBECONFIG=$KUBECONFIG_PATH

if [[ "$TESTCASE" == "windows-conformance" ]]; then
if [[ "$TESTCASE" =~ "windows-networkpolicy-no" ]]; then
# Antrea Windows agents are deployed with scripts as processes on host for Windows NetworkPolicy test
wait_for_antrea_windows_processes_ready
else
# Antrea Windows agent Pods are deployed for Windows Conformance test
clean_for_windows_install_cni
wait_for_antrea_windows_pods_ready
else
# Antrea Windows agents are deployed with scripts as processes on host for Windows NetworkPolicy test
wait_for_antrea_windows_processes_ready
fi

echo "====== Run test with e2e.test ======"
export KUBE_TEST_REPO_LIST=${WORKDIR}/repo_list
if [ "$TESTCASE" == "windows-networkpolicy" ]; then
if [ "$TESTCASE" == "windows-networkpolicy-no" ]; then
ginkgo -p -nodes 8 --seed=1592804472 --noColor $E2ETEST_PATH -- --provider=skeleton --ginkgo.focus="$WINDOWS_NETWORKPOLICY_FOCUS" --ginkgo.skip="$WINDOWS_NETWORKPOLICY_SKIP" > windows_conformance_result_no_color.txt || true
else
ginkgo --noColor $E2ETEST_PATH -- --provider=skeleton --node-os-distro=windows --ginkgo.focus="$WINDOWS_CONFORMANCE_FOCUS" --ginkgo.skip="$WINDOWS_CONFORMANCE_SKIP" > windows_conformance_result_no_color.txt || true
Expand Down

0 comments on commit fbd60d1

Please sign in to comment.