File tree 2 files changed +21
-8
lines changed
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)
2
1
clone :
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
3
10
clone :
4
11
image : plugins/git
5
12
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
12
14
13
- pipeline :
14
15
# TESTS:
15
16
# We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
16
17
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
" [email protected] "
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