diff --git a/.drone.yml b/.drone.yml index a31e0ee59bdf..f761d92a5cb8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,12 +3,12 @@ clone: clone: image: plugins/git commands: - - sleep 5s - git init - - git remote add origin $DRONE_REMOTE_URL - - git fetch --no-tags origin $DRONE_COMMIT_REF - - if [ $DRONE_BUILD_EVENT = "push" ]; then git reset --hard -q $DRONE_COMMIT_SHA; else git checkout -qf FETCH_HEAD; fi - - git submodule update --init --recursive + - git remote add origin "$DRONE_REMOTE_URL" + - git pull origin "$DRONE_BRANCH" + - git fetch origin "$DRONE_COMMIT_REF" + - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then git merge "$DRONE_COMMIT_SHA"; else git checkout -qf "$DRONE_COMMIT_SHA"; fi + - git submodule update --init --recursive --jobs 3 pipeline: # TESTS: