Skip to content

Commit

Permalink
Update Rancher test script to skip sig-network test
Browse files Browse the repository at this point in the history
Signed-off-by: Pulkit Jain <[email protected]>
  • Loading branch information
jainpulkit22 committed Jun 18, 2024
1 parent 28b38ad commit 3cd4f99
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ci/jenkins/test-rancher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ function deliver_antrea {
chmod -R g-w build/images/ovs
chmod -R g-w build/images/base
DOCKER_REGISTRY="${DOCKER_REGISTRY}" ./hack/build-antrea-linux-all.sh --pull
export NO_PULL=1
export DOCKER_BUILDKIT=1
make flow-aggregator-image

# Enable verbose log for troubleshooting.
Expand All @@ -153,14 +155,14 @@ function deliver_antrea {
control_plane_ip="$(kubectl get nodes -l node-role.kubernetes.io/control-plane -o wide --no-headers=true | awk '{print $6}')"

cp -f build/yamls/*.yml $WORKDIR
scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "${WORKDIR}/.ssh/id_rsa" build/yamls/*.yml ubuntu@[${control_plane_ip}]:~/
scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "${WORKDIR}/.ssh/id_rsa" build/yamls/*.yml ubuntu@${control_plane_ip}:~/

echo "====== Delivering Antrea to all the Nodes ======"
docker save -o antrea-ubuntu.tar antrea/antrea-agent-ubuntu:latest antrea/antrea-controller-ubuntu:latest
docker save -o flow-aggregator.tar antrea/flow-aggregator:latest
kubectl get nodes -o wide --no-headers=true | awk '{print $6}' | while read IP; do
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" antrea-ubuntu.tar ubuntu@[${IP}]:~/antrea-ubuntu.tar
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" flow-aggregator.tar ubuntu@[${IP}]:~/flow-aggregator.tar
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" antrea-ubuntu.tar ubuntu@${IP}:~/antrea-ubuntu.tar
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" flow-aggregator.tar ubuntu@${IP}:~/flow-aggregator.tar
ssh -o StrictHostKeyChecking=no -n ubuntu@${IP} "${CLEAN_STALE_IMAGES}; docker load -i ~/antrea-ubuntu.tar; docker load -i ~/flow-aggregator.tar" || true
done
}
Expand Down Expand Up @@ -236,9 +238,9 @@ function run_conformance {

set +e
if [[ "$TESTCASE" =~ "conformance" ]]; then
${WORKSPACE}/ci/run-k8s-e2e-tests.sh --e2e-conformance --log-mode $MODE --image-pull-policy ${IMAGE_PULL_POLICY} --kubernetes-version "auto" > ${WORKSPACE}/test-result.log
${WORKSPACE}/ci/run-k8s-e2e-tests.sh --e2e-conformance --log-mode $MODE --image-pull-policy ${IMAGE_PULL_POLICY} --kubernetes-version "auto" --rancher-testbed > ${WORKSPACE}/test-result.log
else
${WORKSPACE}/ci/run-k8s-e2e-tests.sh --e2e-network-policy --log-mode $MODE --image-pull-policy ${IMAGE_PULL_POLICY} --kubernetes-version "auto" > ${WORKSPACE}/test-result.log
${WORKSPACE}/ci/run-k8s-e2e-tests.sh --e2e-network-policy --log-mode $MODE --image-pull-policy ${IMAGE_PULL_POLICY} --kubernetes-version "auto" --rancher-testbed > ${WORKSPACE}/test-result.log
fi

TEST_SCRIPT_RC=$?
Expand Down
7 changes: 7 additions & 0 deletions ci/run-k8s-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function echoerr {
>&2 echo "$@"
}

RANCHER=false
RUN_CONFORMANCE=false
RUN_WHOLE_CONFORMANCE=false
RUN_NETWORK_POLICY=false
Expand Down Expand Up @@ -64,6 +65,7 @@ least one failed) and 2 (internal error when running tests, not a test failure).
--log-mode Use the flag to set either 'report', 'detail', or 'dump' level data for sonobuoy results.
--image-pull-policy The ImagePullPolicy Sonobuoy should use for the aggregators and workers. (default Always)
--sonobuoy-image SonobuoyImage Sonobuoy image to use. Default is $SONOBUOY_IMAGE.
--rancher-testbed Use the flag to specify that the cluster is a Rancher cluster.
--help, -h Print this message and exit
This tool uses sonobuoy (https://github.com/vmware-tanzu/sonobuoy) to run the K8s e2e community
Expand Down Expand Up @@ -138,6 +140,11 @@ case $key in
SYSTEMD_LOGS_IMAGE="$2"
shift 2
;;
--rancher-testbed)
RANCHER=true
DEFAULT_E2E_CONFORMANCE_SKIP="${DEFAULT_E2E_CONFORMANCE_SKIP}|\[Ingress\]"
shift
;;
-h|--help)
print_usage
exit 0
Expand Down

0 comments on commit 3cd4f99

Please sign in to comment.