SSH runner: Honor clone depth property from pipeline on checkout

When using the SSH runner from DockerHub drone/drone-runner-ssh:latest with a pipeline like:

kind: pipeline
type: ssh
name: ci

  host: XXX
  user: XXX
    from_secret: XXX

  depth: 1

- name: hello
  - echo Hello

…the output shows that the depth: 1 property is not respected although the docs say so:

+ git init
Initialized empty Git repository in /tmp/drone-DNfuPrrazu5C3MMX/drone/src/.git/
+ git remote add origin XXX
+ git fetch  origin +refs/heads/add-ci:
From XXX
 * branch            add-ci     -> FETCH_HEAD
 * [new branch]      add-ci     -> origin/add-ci
+ git checkout XXX -b add-ci
Switched to a new branch 'add-ci'

I opened a PR to address this in

1 Like