File tree Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 1- # We override the default clone step to workaround a bug with GitHub (see #3415)
21clone :
2+ git :
3+ image : plugins/git
4+ # We clone submodules ourselves
5+ recursive : false
6+
7+ pipeline :
8+ # We add a custom clone step to workaround a bug with GitHub (see #3415)
9+ # and speed up cloning submodules
310 clone :
411 image : plugins/git
512 commands :
6- - sleep 5s
7- - git init
8- - git remote add origin $DRONE_REMOTE_URL
9- - git fetch --no-tags origin $DRONE_COMMIT_REF
10- - if [ $DRONE_BUILD_EVENT = "push" ]; then git reset --hard -q $DRONE_COMMIT_SHA; else git checkout -qf FETCH_HEAD; fi
11- - git submodule update --init --recursive
13+ - ./project/scripts/ci-clone
1214
13- pipeline :
1415 # TESTS:
1516 # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
1617 test_legacy :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ set -eux
3+
4+ # if build is PR rebase on top of target branch
5+ if [ " $DRONE_BUILD_EVENT " = " pull_request" ]; then
6+ git config user.email " allan.renucci@gmail.com"
7+ git config user.name " Allan Renucci"
8+ git pull --rebase " $DRONE_REMOTE_URL " " $DRONE_BRANCH "
9+ fi
10+
11+ # clone submodules in parallel
12+ git submodule update --init --recursive --jobs 3
You can’t perform that action at this time.
0 commit comments