File: get-tagged-code.yml

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (40 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download | duplicates (3)
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'