2017-05-04 13:23:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2020-09-16 13:46:04 +00:00
|
|
|
export REPO='traefik/traefik'
|
2017-05-04 13:23:04 +00:00
|
|
|
|
|
|
|
if VERSION=$(git describe --exact-match --abbrev=0 --tags);
|
|
|
|
then
|
|
|
|
export VERSION
|
|
|
|
else
|
|
|
|
export VERSION=''
|
|
|
|
fi
|
|
|
|
|
2021-06-28 16:00:12 +00:00
|
|
|
export CODENAME=brie
|
2017-05-04 13:23:04 +00:00
|
|
|
|
|
|
|
export N_MAKE_JOBS=2
|
2017-05-09 07:19:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
function ci_retry {
|
|
|
|
|
|
|
|
local NRETRY=3
|
|
|
|
local NSLEEP=5
|
|
|
|
local n=0
|
|
|
|
|
|
|
|
until [ $n -ge $NRETRY ]
|
|
|
|
do
|
|
|
|
"$@" && break
|
2019-05-10 15:24:06 +00:00
|
|
|
n=$((n+1))
|
|
|
|
echo "${*} failed, attempt ${n}/${NRETRY}"
|
2017-05-09 07:19:12 +00:00
|
|
|
sleep $NSLEEP
|
|
|
|
done
|
|
|
|
|
|
|
|
[ $n -lt $NRETRY ]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export -f ci_retry
|