Skip to content

Commit

Permalink
test: Remove retry in podman build and push
Browse files Browse the repository at this point in the history
Do not need retry because registry is local now

Signed-off-by: Xiaofeng Wang <[email protected]>
  • Loading branch information
henrywang committed Oct 29, 2024
1 parent b22970a commit e1abaef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
10 changes: 5 additions & 5 deletions tests/e2e/bootc-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ cat "$INSTALL_CONTAINERFILE"

# Build test bootc image and push to local registry
greenprint "Build $TEST_OS installation container image"
sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$INSTALL_CONTAINERFILE" "$TEMPDIR"
sudo podman build --tls-verify=false -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$INSTALL_CONTAINERFILE" "$TEMPDIR"

greenprint "Push $TEST_OS installation container image"
retry sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"

# Prepare Ansible inventory file and ansible.cfg
greenprint "Prepare inventory file"
Expand Down Expand Up @@ -290,14 +290,14 @@ REALEOF

# Build upgrade container image and push to locay registry
greenprint "Build $TEST_OS upgrade container image"
sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" .
sudo podman build --tls-verify=false -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" .

greenprint "Push $TEST_OS upgrade container image"
retry sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"

# Copy upgrade image to local folder for bootc switch test
if [[ "$AIR_GAPPED_DIR" != "" ]]; then
retry skopeo copy docker://"$TEST_IMAGE_URL" dir://"$AIR_GAPPED_DIR"
skopeo copy docker://"$TEST_IMAGE_URL" dir://"$AIR_GAPPED_DIR"
BOOTC_IMAGE="/mnt"
else
BOOTC_IMAGE="$TEST_IMAGE_URL"
Expand Down
11 changes: 0 additions & 11 deletions tests/e2e/shared_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ function redprint {
echo -e "\033[1;31m[$(date -Isecond)] ${1}\033[0m"
}

# Retry container image pull and push
function retry {
n=0
until [ "$n" -ge 3 ]
do
"$@" && break
n=$((n+1))
sleep 10
done
}

function deploy_libvirt_network {
greenprint "Start firewalld"
sudo systemctl enable --now firewalld
Expand Down

0 comments on commit e1abaef

Please sign in to comment.