test.sh fails with bash complaining about 'continue' statement
Closed this issue · 2 comments
When refactoring the code of test.sh some lines of code of the for loop were move into the testDynamicPackages function (see Injecting PR #25) causing the script to fail as explained below.
Originally, in case one of the test artifact file is missing we skip the test for the given distribution:release thanks to a continue
statement in the for loop. Inadvertently this continue
statement has been moved into that function.
The logic need to be rework a bit so that it works with the function call.
Here are the logs depicted the issue;
# Tests of the dynamic packages #
## Looking for debian-bullseye ##
tmp created
/workspace/tmp /workspace
### Copying the packages and the dockerfile for debian-bullseye ###
cp: cannot stat '/workspace/containerd-v1.5.11_240322-1707/debian/bullseye/ppc64*/containerd.io_1.5.11*_ppc64*.deb': No such file or directory
bundles-ce-debian-bullseye-ppc64le.tar.gz
ls: cannot access 'containerd*ppc64*.*': No such file or directory
ERROR: The docker-ce packages and/or the containerd packages and/or the Dockerfile is/are missing
/home/prow/go/src/github.com/ppc64le-cloud/docker-ce-build/test.sh: line 86: continue: only meaningful in a `for', `while', or `until' loop
### # Building the test image: t_docker_debian_bullseye # ###
I have only traces of this issue for the build of containerd v1.6.6 using kubectl, and only for 2 (in first case) or 3 (in second try) of the 12 targets.
Looking at details of my data, this issue appears only when a distrib has not been built correctly (ubuntu-jammy and centos-9 due to building on a P8) or when a build fails due to web-access temporarily broken.
So, I have no data proving that this still appears.
I'll have to collect more data when building again a new set of versions for Docker and Containerd. Or I have to rebuild 20.10.17 for collecting more traces.
I'll have to check that I save all useful traces.
This issue has probably been fixed earlier.