Cloning

Drone automatically configures a default clone step if not explicitly defined. You can manually configure the clone step in your pipeline for customization:

+clone:
+  git:
+    image: plugins/git

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

Example configuration to override depth:

clone:
  git:
    image: plugins/git
+   depth: 50

Example configuration to use a custom clone plugin:

clone:
  git:
+   image: octocat/custom-git-plugin

Example configuration to clone Mercurial repository:

clone:
  hg:
+   image: pluins/hg
+   path: bitbucket.org/foo/bar

Questions?

We are always happy to help with questions you might have. Search our documentation or check out answers to common questions. You can also post questions or comments to our community forum.