mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
34 lines
979 B
YAML
34 lines
979 B
YAML
parameters:
|
|
# name of the repo to checkout
|
|
# for most cases, leave as default 'self'
|
|
- name: checkoutRepo
|
|
type: string
|
|
default: 'self'
|
|
- name: sparseCheckout
|
|
type: boolean
|
|
default: false
|
|
- name: sparseCheckoutDir
|
|
type: string
|
|
default: ''
|
|
# submodule download behaviour
|
|
# change to 'recursive' for repos with submodules
|
|
- name: submoduleBehaviour
|
|
type: string
|
|
default: 'true'
|
|
|
|
steps:
|
|
- checkout: ${{ parameters.checkoutRepo }}
|
|
clean: true
|
|
submodules: ${{ parameters.submoduleBehaviour }}
|
|
retryCountOnTaskFailure: 3
|
|
fetchFilter: blob:none
|
|
${{ if eq(parameters.sparseCheckout, true) }}:
|
|
sparseCheckoutDirectories: ${{ parameters.sparseCheckoutDir }}
|
|
path: sparse
|
|
- ${{ if eq(parameters.sparseCheckout, true) }}:
|
|
- task: Bash@3
|
|
displayName: Symlink sparse checkout
|
|
inputs:
|
|
targetType: inline
|
|
script: ln -s $(Agent.BuildDirectory)/sparse/${{ parameters.sparseCheckoutDir }} $(Agent.BuildDirectory)/s
|