Skip to content
Snippets Groups Projects
Commit 1e67b7a5 authored by Cenk Gündoğan's avatar Cenk Gündoğan Committed by Cenk Gündoğan
Browse files

jenkins: use local RIOT mirror to speed up fetches

parent 85d83974
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ abortPreviousBuilds()
stage('setup') {
node ('master') {
sh '(( "\${RIOT_MIRROR}" )) && git -C "\${RIOT_MIRROR_DIR}" fetch --all'
deleteDir()
fetchPR(env.CHANGE_ID, "--depth=1", "")
......@@ -220,7 +222,10 @@ def fetchPR(prNum, fetchArgs, extraRefSpec)
{
retry(3) {
timeout(time: 60, unit: 'SECONDS') {
sh """git init; git remote add origin https://github.com/RIOT-OS/RIOT;
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}"""
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment