ibvhefe / SelectiveCheckout

2 stars 2 forks source link

Selective Checkout for Azure DevOps

This extension contains a pipeline task that allows for slim git checkouts. You can select what folders you want to download. This keeps your traffic low and your build times short.

Requirements

Git v2.37.1+ needs to be installed on the build agent.

Usage

steps:
- checkout: none

- task: SelectiveCheckout@0
  inputs:
    pathsToCheckout: 'path/to/download'

For multiple paths:

steps:
- checkout: none

- task: SelectiveCheckout@0
  inputs:
    pathsToCheckout: |
      path/to/download/1/
      path/to/download/2/

If a shallow clone is not wanted:

steps:
- checkout: none

- task: SelectiveCheckout@0
  inputs:
    pathsToCheckout: 'path/to/download/*'
    fetchDepth: 0 # The same semantics as the normal checkout task.

Limitations

If you need more features, feel free to contact me.