ceph/qa/workunits/fs/snaps/snaptest-git-ceph.sh
Xiubo Li 89177d6598 qa: switch to https protocol for repos' server
Since the git:// is not reachable any more and have switch to
https://.

The git archive does not support the https protocol, so we couldn't
user the git archive to retrieve the tar ball any more, will split
this into 3 steps:

1, clone the whole ceph repo
2, checkout the commit/tag/branch
3, then change directory to qa/workunits/.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-12-12 21:05:57 +08:00

53 lines
790 B
Bash
Executable File

#!/bin/sh -x
set -e
# try it again if the clone is slow and the second time
retried=false
trap -- 'retry' EXIT
retry() {
rm -rf ceph
# double the timeout value
timeout 3600 git clone https://git.ceph.com/ceph.git
}
rm -rf ceph
timeout 1800 git clone https://git.ceph.com/ceph.git
trap - EXIT
cd ceph
versions=`seq 1 90`
for v in $versions
do
if [ $v -eq 48 ]; then
continue
fi
ver="v0.$v"
echo $ver
git reset --hard $ver
mkdir .snap/$ver
done
for v in $versions
do
if [ $v -eq 48 ]; then
continue
fi
ver="v0.$v"
echo checking $ver
cd .snap/$ver
git diff --exit-code
cd ../..
done
for v in $versions
do
if [ $v -eq 48 ]; then
continue
fi
ver="v0.$v"
rmdir .snap/$ver
done
echo OK