Skip to content

Commit

Permalink
skip to remove all the kind testbed images to avoid rate limit issue
Browse files Browse the repository at this point in the history
Signed-off-by: KMAnju-2021 <[email protected]>
  • Loading branch information
KMAnju-2021 committed Sep 17, 2024
1 parent b96d22f commit c819cb8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 21 additions & 5 deletions ci/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@ function clean_antrea {
for antrea_yml in ${WORKDIR}/*.yml; do
kubectl delete -f $antrea_yml --ignore-not-found=true || true
done
docker images --format "{{.Repository}}:{{.Tag}}" | grep 'antrea'| xargs -r docker rmi || true
docker images | grep '<none>' | awk '{print $3}' | xargs -r docker rmi || true
if [[ $TESTBED_TYPE == "kind-flexible-ipam" || $TESTBED_TYPE == "kind" ]]; then
docker images --format "{{.Repository}}:{{.Tag}}" | grep 'antrea' | grep -Ev 'antrea/toolbox:latest|antrea/ubuntu:22.04|antrea/golang:1.23' | xargs -r docker rmi || true
else
docker images --format "{{.Repository}}:{{.Tag}}" | grep 'antrea'| xargs -r docker rmi -f || true
docker images | grep '<none>' | awk '{print $3}' | xargs -r docker rmi || true
fi
check_and_cleanup_docker_build_cache
}

Expand Down Expand Up @@ -535,26 +539,38 @@ function deliver_antrea {
export GOROOT=${GOLANG_RELEASE_DIR}/go
export GOCACHE="${WORKSPACE}/../gocache"
export PATH=${GOROOT}/bin:$PATH

echo "debug-1"
git show --numstat
make clean
${CLEAN_STALE_IMAGES}
echo "debug-2"
if [[ $TESTBED_TYPE != "kind" ]]; then
if [[ $TESTBED_TYPE != "kind-flexible-ipam" ]]; then
${CLEAN_STALE_IMAGES}
fi
fi
${PRINT_DOCKER_STATUS}
echo "debug-3"
if [[ ! "${TESTCASE}" =~ "e2e" && "${DOCKER_REGISTRY}" != "" ]]; then
docker pull "${DOCKER_REGISTRY}/antrea/systemd-logs:v0.4"
docker tag "${DOCKER_REGISTRY}/antrea/systemd-logs:v0.4" "antrea/systemd-logs:v0.4"
echo "debug-4"
fi
echo "debug-5"
chmod -R g-w build/images/ovs
chmod -R g-w build/images/base
echo "debug-6"
if [[ "$BUILD_TAG" != "latest" ]]; then
DOCKER_REGISTRY="${DOCKER_REGISTRY}" ./hack/build-antrea-linux-all.sh --build-tag ${BUILD_TAG} --pull
IMG_TAG="${BUILD_TAG}" ./hack/generate-manifest.sh $MANIFEST_ARGS > build/yamls/antrea.yml
echo "debug-7"
else

DOCKER_REGISTRY="${DOCKER_REGISTRY}" ./hack/build-antrea-linux-all.sh --pull
./hack/generate-manifest.sh $MANIFEST_ARGS > build/yamls/antrea.yml
fi
echo "debug-9"
make flow-aggregator-image

echo "debug-10"
# Enable verbose log for troubleshooting.
sed -i "s/--v=0/--v=4/g" build/yamls/antrea.yml

Expand Down
2 changes: 2 additions & 0 deletions hack/build-antrea-linux-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ fi
# image!
if $PULL; then
if [[ ${DOCKER_REGISTRY} == "" ]]; then
echo "debug-12"
docker pull $PLATFORM_ARG ubuntu:22.04
docker pull $PLATFORM_ARG golang:$GO_VERSION
else
echo "debug-13"
docker pull ${DOCKER_REGISTRY}/antrea/ubuntu:22.04
docker tag ${DOCKER_REGISTRY}/antrea/ubuntu:22.04 ubuntu:22.04
docker pull ${DOCKER_REGISTRY}/antrea/golang:$GO_VERSION
Expand Down

0 comments on commit c819cb8

Please sign in to comment.