1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #6464 from cgundogan/pr/jenkins_enh

jenkins: move retry+timeout out of groovy into shell
This commit is contained in:
Sebastian Meiling 2017-01-24 16:07:29 +01:00 committed by GitHub
commit 40c84dee66

10
Jenkinsfile vendored
View File

@ -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}
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}"""
}
}
}