|
|
|
@ -220,14 +220,12 @@ def abortOnError(msg)
|
|
|
|
|
|
|
|
|
|
def fetchPR(prNum, fetchArgs, extraRefSpec)
|
|
|
|
|
{
|
|
|
|
|
retry(3) {
|
|
|
|
|
timeout(time: 60, unit: 'SECONDS') {
|
|
|
|
|
deleteDir()
|
|
|
|
|
sh """git init
|
|
|
|
|
if (( "\${RIOT_MIRROR}" )); then RIOT_URL="\${RIOT_MIRROR_URL}"; else RIOT_URL="https://github.com/RIOT-OS/RIOT"; fi
|
|
|
|
|
git remote add origin "\${RIOT_URL}"
|
|
|
|
|
git fetch -u -n ${fetchArgs} origin ${extraRefSpec} pull/${prNum}/merge:pull_${prNum}
|
|
|
|
|
git checkout pull_${prNum}"""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sh """git init
|
|
|
|
|
if (( "\${RIOT_MIRROR}" )); then RIOT_URL="\${RIOT_MIRROR_URL}"; else RIOT_URL="https://github.com/RIOT-OS/RIOT"; fi
|
|
|
|
|
git remote add origin "\${RIOT_URL}"
|
|
|
|
|
for RETRIES in {1..3}; do
|
|
|
|
|
timeout 30 git fetch -u -n ${fetchArgs} origin ${extraRefSpec} pull/${prNum}/merge:pull_${prNum} && break
|
|
|
|
|
done
|
|
|
|
|
[[ "\$RETRIES" -eq 3 ]] && exit 1
|
|
|
|
|
git checkout pull_${prNum}"""
|
|
|
|
|
}
|
|
|
|
|