1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
parameters:
- name: DestinationDirectory
type: string
default: ''
- name: Package
type: string
default: ''
- name: CheckoutPath
type: string
default: ''
- name: Version
type: string
default: ''
steps:
- pwsh: |
$targetPath = "$(Agent.TempDirectory)/${{ parameters.Package }}"
mkdir -p $targetPath
Write-Host "##vso[task.setvariable variable=Package.Clone]$targetPath"
displayName: 'Prep for Sparse Checkout'
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Paths:
- "${{ parameters.CheckoutPath }}/${{ parameters.Package }}"
Repositories:
- Name: "Azure/azure-sdk-for-python"
Commitish: "${{ parameters.Package }}_${{ parameters.Version }}"
WorkingDirectory: "$(Package.Clone)"
SkipCheckoutNone: true
- pwsh: |
$pathForCopy = Join-Path -Path "$(Package.Clone)" -ChildPath "${{ parameters.CheckoutPath }}/${{ parameters.Package }}"
Write-Host $pathForCopy
Write-Host ${{ parameters.DestinationDirectory }}
Copy-Item -Path $pathForCopy -Destination ${{ parameters.DestinationDirectory }} -Recurse
displayName: 'Copy Source to Target Directory'
|