Browse Source

Merge pull request #6464 from cgundogan/pr/jenkins_enh

jenkins: move retry+timeout out of groovy into shell
pr/spi.typo
Sebastian Meiling 5 years ago committed by GitHub
parent
commit
40c84dee66
  1. 18
      Jenkinsfile

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…
Cancel
Save