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:
commit
40c84dee66
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -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}"""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user